Changeset 24678
- Timestamp:
- 07/12/2013 05:25:27 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/revisions.js
r24671 r24678 828 828 // Responds to slide events 829 829 slide: function( event, ui ) { 830 var attributes ;830 var attributes, movedRevision; 831 831 // Compare two revisions mode 832 832 if ( ! _.isUndefined( ui.values ) && this.model.get('compareTwoMode') ) { … … 839 839 from: this.model.revisions.at( isRtl ? this.model.revisions.length - ui.values[1] - 1 : ui.values[0] ) // Reverse directions for RTL. 840 840 }; 841 841 movedRevision = ! isRtl && ui.value === ui.values[0] ? attributes.from : attributes.to; 842 842 } else { 843 843 // Compare single revision mode … … 846 846 to: this.model.revisions.at( sliderPosition ) 847 847 }; 848 848 movedRevision = attributes.to; 849 849 // If we're at the first revision, unset 'from'. 850 850 if ( sliderPosition ) // Reverse directions for RTL. … … 853 853 attributes.from = undefined; 854 854 } 855 856 // If we are scrubbing, a scrub to a revision is considered a hover 857 if ( this.model.get('scrubbing') ) 858 attributes.hoveredRevision = movedRevision; 859 855 860 this.model.set( attributes ); 856 857 // If we are scrubbing, a scrub to a revision is considered a hover858 if ( this.model.get( 'scrubbing' ) ) {859 this.model.set({860 'hoveredRevision': attributes.to861 });862 }863 861 }, 864 862
Note: See TracChangeset
for help on using the changeset viewer.