mediawiki-extensions-Revisi.../modules/ext.RevisionSlider.Pointer.js
Jakob Warkotsch f5d9347d93 Make pointer offset depend on whether pointer is the upper pointer.
Bug: T135837
Change-Id: I0ccc34751765f1f98dd29426d4efb3f3419f3932
2016-05-26 12:30:12 +02:00

33 lines
558 B
JavaScript

( function ( mw, $ ) {
var Pointer = function ( id ) {
this.view = new mw.libs.revisionSlider.PointerView( this, id );
};
$.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 ) );