mediawiki-extensions-Revisi.../modules/ext.RevisionSlider.Pointer.js
addshore ec80c4fa6f Get rid of left and right pointers.
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
2016-05-13 11:23:11 +00:00

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 ) );