mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-15 11:40:43 +00:00
ec80c4fa6f
As the pointers can switch side the idea of having a left and right one will just lead to confusion, so lets kill that idea now! :D Change-Id: I9d56314ea4cf46402df56e0a038bfb9655218960
33 lines
574 B
JavaScript
33 lines
574 B
JavaScript
( function ( mw, $ ) {
|
|
var Pointer = function ( id, offset ) {
|
|
this.view = new mw.libs.revisionSlider.PointerView( this, id, offset );
|
|
};
|
|
|
|
$.extend( Pointer.prototype, {
|
|
/**
|
|
* @type {int}
|
|
*/
|
|
position: 0,
|
|
|
|
/**
|
|
* @type {PointerView}
|
|
*/
|
|
view: null,
|
|
|
|
setPosition: function ( p ) {
|
|
this.position = p;
|
|
},
|
|
|
|
getPosition: function () {
|
|
return this.position;
|
|
},
|
|
|
|
getView: function () {
|
|
return this.view;
|
|
}
|
|
} );
|
|
|
|
mw.libs.revisionSlider = mw.libs.revisionSlider || {};
|
|
mw.libs.revisionSlider.Pointer = Pointer;
|
|
}( mediaWiki, jQuery ) );
|