Christian has uploaded a new change for review.
https://gerrit.wikimedia.org/r/70321
Change subject: Overlay fixes
......................................................................
Overlay fixes
Proper z-indexing of relocatable-marker, resizeable-handles,
and context menu
Better positioning of embedded context menu
Change-Id: Ic40b53c1c8b7c9c4f77705a8c0231af3c8a3629e
---
M modules/ve/ce/styles/ve.ce.Node.css
M modules/ve/ui/styles/ve.ui.Context.css
M modules/ve/ui/ve.ui.Context.js
M modules/ve/ui/widgets/ve.ui.PopupWidget.js
4 files changed, 18 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/21/70321/1
diff --git a/modules/ve/ce/styles/ve.ce.Node.css
b/modules/ve/ce/styles/ve.ce.Node.css
index fb17953..2a90234 100644
--- a/modules/ve/ce/styles/ve.ce.Node.css
+++ b/modules/ve/ce/styles/ve.ce.Node.css
@@ -70,13 +70,14 @@
/* ve.ce.ResizableNode */
+/* Position above relocatableNode-marker and and embedded context menu */
.ve-ce-resizableNode-handles {
position: absolute;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
- z-index: 1; /* Position above RelocatableNode's relocatableMarker */
+ z-index: 2;
}
.ve-ce-resizableNode-handles-resizing {
diff --git a/modules/ve/ui/styles/ve.ui.Context.css
b/modules/ve/ui/styles/ve.ui.Context.css
index 93a2ab7..1df593f 100644
--- a/modules/ve/ui/styles/ve.ui.Context.css
+++ b/modules/ve/ui/styles/ve.ui.Context.css
@@ -32,6 +32,11 @@
background-image: none;
}
+/* Position above relocatableNode-marker and and below resizableNode-handles */
+.ve-ui-context-embed {
+ z-index: 1;
+}
+
.ve-ui-context-embed .ve-ui-popupWidget-callout {
display: none;
}
diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js
index 97cca57..26b4fb6 100644
--- a/modules/ve/ui/ve.ui.Context.js
+++ b/modules/ve/ui/ve.ui.Context.js
@@ -279,7 +279,8 @@
position.y,
$container.outerWidth( true ),
$container.outerHeight( true ),
- transition
+ transition,
+ this.embedded
);
}
diff --git a/modules/ve/ui/widgets/ve.ui.PopupWidget.js
b/modules/ve/ui/widgets/ve.ui.PopupWidget.js
index 95ed4e5..02faf1c 100644
--- a/modules/ve/ui/widgets/ve.ui.PopupWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.PopupWidget.js
@@ -132,7 +132,7 @@
* @method
* @chainable
*/
-ve.ui.PopupWidget.prototype.display = function ( x, y, width, height,
transition ) {
+ve.ui.PopupWidget.prototype.display = function ( x, y, width, height,
transition, embedded ) {
var left, overlapLeft, overlapRight,
padding = 15;
@@ -152,12 +152,14 @@
}
// Prevent viewport clipping, using padding between body and popup edges
- overlapRight = this.$$( 'body' ).width() - ( x + ( width + left + (
padding * 2 ) ) );
- overlapLeft = x + ( left - ( padding * 2 ) );
- if ( overlapRight < 0 ) {
- left += overlapRight;
- } else if ( overlapLeft < 0 ) {
- left -= overlapLeft;
+ if ( !embedded ) {
+ overlapRight = this.$$( 'body' ).width() - ( x + ( width + left
+ ( padding * 2 ) ) );
+ overlapLeft = x + ( left - ( padding * 2 ) );
+ if ( overlapRight < 0 ) {
+ left += overlapRight;
+ } else if ( overlapLeft < 0 ) {
+ left -= overlapLeft;
+ }
}
// Prevent transition from being interrupted
--
To view, visit https://gerrit.wikimedia.org/r/70321
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic40b53c1c8b7c9c4f77705a8c0231af3c8a3629e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Christian <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits