%PDF- %PDF-
| Direktori : /www/varak.net/wiki.varak.net/extensions/VisualEditor/lib/ve/src/ui/ |
| Current File : //www/varak.net/wiki.varak.net/extensions/VisualEditor/lib/ve/src/ui/ve.ui.WindowManager.js |
/*!
* VisualEditor UserInterface WindowManager class.
*
* @copyright 2011-2016 VisualEditor Team and others; see http://ve.mit-license.org
*/
/**
* Window manager.
*
* @class
* @extends OO.ui.WindowManager
*
* @constructor
* @param {Object} [config] Configuration options
* @cfg {ve.ui.Overlay} [overlay] Overlay to use for menus
*/
ve.ui.WindowManager = function VeUiWindowManager( config ) {
// Configuration initialization
config = config || {};
// Parent constructor
ve.ui.WindowManager.super.call( this, config );
// Properties
this.overlay = config.overlay || null;
// The following classes can be used here:
// ve-ui-dir-block-ltr
// ve-ui-dir-block-rtl
this.$element.addClass( 've-ui-dir-block-' + this.getDir() );
};
/* Inheritance */
OO.inheritClass( ve.ui.WindowManager, OO.ui.WindowManager );
/* Methods */
/**
* Get directionality.
*
* @return {string} UI directionality
*/
ve.ui.WindowManager.prototype.getDir = function () {
return $( 'body' ).css( 'direction' );
};
/**
* Get overlay for menus.
*
* @return {ve.ui.Overlay|null} Menu overlay, null if none was configured
*/
ve.ui.WindowManager.prototype.getOverlay = function () {
return this.overlay;
};