Bartosz Dziewoński has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/374561 )
Change subject: ve.ui.MWEducationPopupTool: Position blue dots with CSS only
......................................................................
ve.ui.MWEducationPopupTool: Position blue dots with CSS only
We can place them in bottom center of the toolbar buttons with
just CSS, no need to manually calculate the position (which
doesn't give the correct results if the toolbar is not visible).
Also add z-index for correct rendering inside TargetWidget,
not overlapped by the toolbar border (e.g. in the media dialog).
Bug: T174120
Change-Id: I556ddfcf252669107cf21810fbed7c9a3751e906
---
M modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
M modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
2 files changed, 14 insertions(+), 18 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/61/374561/1
diff --git a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
index e965711..d88006f 100644
--- a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
+++ b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
@@ -5,12 +5,21 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
+.ve-ui-pulsatingDot,
+.ve-ui-stillDot {
+ position: absolute;
+ bottom: 0;
+ left: 50%;
+ z-index: 1;
+ border-radius: 50%;
+ background-color: #36c;
+}
+
.ve-ui-pulsatingDot {
width: 2.5em;
height: 2.5em;
- border-radius: 50%;
- background-color: #36c;
- position: absolute;
+ margin-bottom: -1.25em;
+ margin-left: -1.25em;
opacity: 0;
-webkit-animation: pulse 3s ease-out;
-moz-animation: pulse 3s ease-out;
@@ -23,9 +32,8 @@
.ve-ui-stillDot {
width: 0.8em;
height: 0.8em;
- border-radius: 50%;
- background-color: #36c;
- position: absolute;
+ margin-bottom: -0.4em;
+ margin-left: -0.4em;
}
.ve-ui-educationPopup-shield {
diff --git a/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
b/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
index 5b83f73..8d1465e 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
@@ -89,18 +89,6 @@
$shield.remove();
}
} );
-
- setTimeout( function () {
- var radius = tool.$pulsatingDot.width() / 2;
- tool.$pulsatingDot.css( {
- left: tool.$element.width() / 2 - radius,
- top: tool.$element.height() - radius
- } );
- tool.$stillDot.css( {
- left: tool.$element.width() / 2 - radius / 3,
- top: tool.$element.height() - radius / 3
- } );
- }, 0 );
};
/* Inheritance */
--
To view, visit https://gerrit.wikimedia.org/r/374561
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I556ddfcf252669107cf21810fbed7c9a3751e906
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits