Merge "RCFilters: Reposition TagItemWidget to be center on the widget"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 23 Jun 2017 00:24:13 +0000 (00:24 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 23 Jun 2017 00:24:13 +0000 (00:24 +0000)
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.TagItemWidget.js

index 886f6d4..bf75149 100644 (file)
@@ -42,7 +42,6 @@
                        }
                }, config ) );
 
-               this.positioned = false;
                this.popupTimeoutShow = null;
                this.popupTimeoutHide = null;
 
                if ( labelText ) {
                        this.popupLabel.setLabel( labelText );
 
-                       if ( !this.positioned ) {
-                               // Recalculate anchor position to be center of the capsule item
-                               this.popup.$anchor.css( 'margin-left', ( this.$element.width() / 2 ) );
-                               this.positioned = true;
-                       }
-
                        // Set timeout for the popup to show
                        this.popupTimeoutShow = setTimeout( function () {
                                this.popup.toggle( true );