mediawiki-extensions-Revisi.../modules/ext.RevisionSlider.Pointer.js
Jakob Warkotsch 11ceffab2f Enhance code documentation.
Bug: T137965
Change-Id: Ice393838545f1545ee085ecdcddfa35f60b32ecd
2016-06-21 13:25:50 +02:00

48 lines
777 B
JavaScript

( function ( mw, $ ) {
/**
* Module containing logic for the revision pointers
*
* @param {string} id
* @constructor
*/
var Pointer = function ( id ) {
this.view = new mw.libs.revisionSlider.PointerView( this, id );
};
$.extend( Pointer.prototype, {
/**
* @type {number}
*/
position: 0,
/**
* @type {PointerView}
*/
view: null,
/**
* @param {number} p
*/
setPosition: function ( p ) {
this.position = p;
},
/**
* @return {number}
*/
getPosition: function () {
return this.position;
},
/**
* @return {PointerView}
*/
getView: function () {
return this.view;
}
} );
mw.libs.revisionSlider = mw.libs.revisionSlider || {};
mw.libs.revisionSlider.Pointer = Pointer;
}( mediaWiki, jQuery ) );