mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-13 07:48:37 +00:00
Update pointer position attributes immediately
Update attributes right after setting position and don't wait until revisions are refreshed. Change-Id: Ic32a554d6939806ce95d4e7b441ee08965b81940
This commit is contained in:
parent
5553fe0688
commit
da8f7fb064
|
@ -306,12 +306,14 @@
|
||||||
|
|
||||||
if ( hasClickedTop ) {
|
if ( hasClickedTop ) {
|
||||||
pNew.setPosition( parseInt( $clickedRev.attr( 'data-pos' ), 10 ) );
|
pNew.setPosition( parseInt( $clickedRev.attr( 'data-pos' ), 10 ) );
|
||||||
|
view.updatePointerPositionAttributes();
|
||||||
view.refreshRevisions(
|
view.refreshRevisions(
|
||||||
view.getRevElementAtPosition( $revisions, pOld.getPosition() ).data( 'revid' ),
|
view.getRevElementAtPosition( $revisions, pOld.getPosition() ).data( 'revid' ),
|
||||||
$clickedRev.data( 'revid' )
|
$clickedRev.data( 'revid' )
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
pOld.setPosition( parseInt( $clickedRev.attr( 'data-pos' ), 10 ) );
|
pOld.setPosition( parseInt( $clickedRev.attr( 'data-pos' ), 10 ) );
|
||||||
|
view.updatePointerPositionAttributes();
|
||||||
view.refreshRevisions(
|
view.refreshRevisions(
|
||||||
$clickedRev.data( 'revid' ),
|
$clickedRev.data( 'revid' ),
|
||||||
view.getRevElementAtPosition( $revisions, pNew.getPosition() ).data( 'revid' )
|
view.getRevElementAtPosition( $revisions, pNew.getPosition() ).data( 'revid' )
|
||||||
|
@ -321,7 +323,6 @@
|
||||||
view.resetPointerColorsBasedOnValues( view.pointerOlder.getPosition(), view.pointerNewer.getPosition() );
|
view.resetPointerColorsBasedOnValues( view.pointerOlder.getPosition(), view.pointerNewer.getPosition() );
|
||||||
view.resetRevisionStylesBasedOnPointerPosition( $revisions );
|
view.resetRevisionStylesBasedOnPointerPosition( $revisions );
|
||||||
view.alignPointers();
|
view.alignPointers();
|
||||||
view.updatePointerPositionAttributes();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue