Nischayn22 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/64556
Change subject: Properly center arrowheads text
......................................................................
Properly center arrowheads text
Code that depends on size of arrows should be inside window.load
Bug: 37109
Change-Id: Ide468a5259dd81bfbd1ca8117b091b4e9cfee7ce
---
M resources/jquery/jquery.arrowSteps.js
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/56/64556/1
diff --git a/resources/jquery/jquery.arrowSteps.js
b/resources/jquery/jquery.arrowSteps.js
index a1fd679..b5364bc 100644
--- a/resources/jquery/jquery.arrowSteps.js
+++ b/resources/jquery/jquery.arrowSteps.js
@@ -54,10 +54,12 @@
// Every step except the last one has an arrow pointing forward:
// at the right hand side in LTR languages, and at the left
hand side in RTL.
// Also add in the padding for the calculated arrow width.
- arrowWidth = parseInt( this.outerHeight(), 10 );
- $steps.filter( ':not(:last-child)' ).addClass( 'arrow' )
- .find( 'div' ).css( paddingSide, arrowWidth.toString() +
'px' );
-
+ $stepDiv = $steps.filter( ':not(:last-child)' ).addClass(
'arrow' ).find( 'div' );
+ _this = this;
+ $(window).load(function() { // executes when complete page is
fully loaded, including all frames, objects and images
+ arrowWidth = parseInt( _this.outerHeight(), 10 );
+ $stepDiv.css( paddingSide, arrowWidth.toString() + 'px'
);
+ });
this.data( 'arrowSteps', $steps );
return this;
};
--
To view, visit https://gerrit.wikimedia.org/r/64556
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide468a5259dd81bfbd1ca8117b091b4e9cfee7ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits