Tobias Gritschacher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315506

Change subject: Update pointer position attributes immediately
......................................................................

Update pointer position attributes immediately

Update attributes right after setting position and
don't wait until revisions are refreshed.

Change-Id: Ic32a554d6939806ce95d4e7b441ee08965b81940
---
M modules/ext.RevisionSlider.SliderView.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/06/315506/1

diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index cfa4756..090ceac 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -306,12 +306,14 @@
 
                        if ( hasClickedTop ) {
                                pNew.setPosition( parseInt( $clickedRev.attr( 
'data-pos' ), 10 ) );
+                               view.updatePointerPositionAttributes();
                                view.refreshRevisions(
                                        view.getRevElementAtPosition( 
$revisions, pOld.getPosition() ).data( 'revid' ),
                                        $clickedRev.data( 'revid' )
                                );
                        } else {
                                pOld.setPosition( parseInt( $clickedRev.attr( 
'data-pos' ), 10 ) );
+                               view.updatePointerPositionAttributes();
                                view.refreshRevisions(
                                        $clickedRev.data( 'revid' ),
                                        view.getRevElementAtPosition( 
$revisions, pNew.getPosition() ).data( 'revid' )
@@ -321,7 +323,6 @@
                        view.resetPointerColorsBasedOnValues( 
view.pointerOlder.getPosition(), view.pointerNewer.getPosition() );
                        view.resetRevisionStylesBasedOnPointerPosition( 
$revisions );
                        view.alignPointers();
-                       view.updatePointerPositionAttributes();
                },
 
                /**

-- 
To view, visit https://gerrit.wikimedia.org/r/315506
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic32a554d6939806ce95d4e7b441ee08965b81940
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to