RCFilters: Reposition TagItemWidget to be center on the widget
authorMoriel Schottlender <moriel@gmail.com>
Fri, 16 Jun 2017 22:09:09 +0000 (15:09 -0700)
committerMoriel Schottlender <moriel@gmail.com>
Fri, 16 Jun 2017 22:09:09 +0000 (15:09 -0700)
Bug: T168091
Change-Id: Iea714cb9c63d30163f01e35e447684af5f39f3ae

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 );