mediawiki-extensions-Revisi.../modules/ext.RevisionSlider.Pointer.js
Ed Sanders e62f46dd80 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Icf10ea6bbc09542e69c0cd583a4ee4f2f76a3f43
2018-11-16 16:33:52 +00:00

62 lines
1,017 B
JavaScript

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