mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-12 23:45:32 +00:00
abfcd2c01b
Allow RevisionSlider to work properly in both LTR and RTL contexts by making sure that when the interface language is RTL, the entire interface flips. "Backwards" and "Forwards" are reversed in RTL context, and the code and behavior should respond to that. Changes made: * Make sure the container has a direction set * Change the placement of the revision divs from absolute positioning (that requires re-calculations when the page is flipped to RTL) to divs that are display: inline-block and have no right/left setting. This means that the DOM will automatically flip its own visual order when the container is set to RTL. * Flip the calculation of positioning and the calculation of which element the pointer is on when it is dragged if the document is RTL. * Mirror all scroll animations when the page is in RTL. * Rename the scroll buttons to 'backwards' and 'forwards' for clarity, as they are flipped when the interface is RTL. * Rename pointers to 'older' and 'newer' instead of trusting their order in the DOM. Bug: T136277 Change-Id: I7c903c2e9d8ee2a0ef2eeb7b99f2251f230a794e |
||
---|---|---|
.. | ||
ext.RevisionSlider.css | ||
ext.RevisionSlider.DiffPage.js | ||
ext.RevisionSlider.fetchRevisions.js | ||
ext.RevisionSlider.init.js | ||
ext.RevisionSlider.noscript.css | ||
ext.RevisionSlider.Pointer.js | ||
ext.RevisionSlider.PointerView.js | ||
ext.RevisionSlider.Revision.js | ||
ext.RevisionSlider.RevisionList.js | ||
ext.RevisionSlider.RevisionListView.js | ||
ext.RevisionSlider.Slider.js | ||
ext.RevisionSlider.SliderView.js |