Bartosz Dziewoński has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/354679 )
Change subject: ve.ui.TableLineContext: Fancier popups ...................................................................... ve.ui.TableLineContext: Fancier popups Remove the custom positioning and let the popups position themselves next to the indicator. Bug: T165865 Change-Id: I1335890b1c03059db33f9da362c43ae565de2939 --- M src/ce/nodes/ve.ce.TableNode.js M src/ui/contexts/ve.ui.TableLineContext.js M src/ui/styles/ve.ui.TableLineContext.css 3 files changed, 2 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/79/354679/1 diff --git a/src/ce/nodes/ve.ce.TableNode.js b/src/ce/nodes/ve.ce.TableNode.js index 366fd2d..3fdafae 100644 --- a/src/ce/nodes/ve.ce.TableNode.js +++ b/src/ce/nodes/ve.ce.TableNode.js @@ -482,17 +482,11 @@ this.colContext.indicator.$element.css( { width: selectionOffset.width } ); - this.colContext.popup.$element.css( { - 'margin-left': selectionOffset.width / 2 - } ); this.rowContext.$element.css( { top: selectionOffset.top } ); this.rowContext.indicator.$element.css( { height: selectionOffset.height - } ); - this.rowContext.popup.$element.css( { - 'margin-top': selectionOffset.height / 2 } ); // Classes diff --git a/src/ui/contexts/ve.ui.TableLineContext.js b/src/ui/contexts/ve.ui.TableLineContext.js index 8694aab..6eb3061 100644 --- a/src/ui/contexts/ve.ui.TableLineContext.js +++ b/src/ui/contexts/ve.ui.TableLineContext.js @@ -33,7 +33,8 @@ } ); this.popup = new OO.ui.PopupWidget( { classes: [ 've-ui-tableLineContext-menu' ], - $container: this.surface.$element, + $floatableContainer: this.indicator.$element, + position: itemGroup === 'col' ? 'below' : 'after', width: 180 } ); diff --git a/src/ui/styles/ve.ui.TableLineContext.css b/src/ui/styles/ve.ui.TableLineContext.css index cdb355e..0033594 100644 --- a/src/ui/styles/ve.ui.TableLineContext.css +++ b/src/ui/styles/ve.ui.TableLineContext.css @@ -34,10 +34,3 @@ margin-left: -1.2em; border-right: 0; } - -/* Position the row context menu popup anchor below the center of the indicator */ -.ve-ui-tableLineContext-row .oo-ui-popupWidget { - /* Gap + half context width: 0.2em + 1em/2 */ - left: -0.7em; - top: 0.4em; -} -- To view, visit https://gerrit.wikimedia.org/r/354679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1335890b1c03059db33f9da362c43ae565de2939 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits