![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/libs/absol-full/dist/js/ |
Upload File : |
/*** module: node_modules/absol-svg/js/controller/CContainerBox.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /*** * * @param {GContainer} $g * @constructor */ function CContainerBox($g) { this.$g = $g; this._width = 0; this._height = 0; this._x = 0; this._y = 0; this.width = 0; this.height = 0; this.x = 0; this.y = 0; } /*** * * @param {number} width * @param {number} height * @returns {CContainerBox} */ CContainerBox.prototype.setSize = function (width, height) { this._width = width; this._height = height; return this; }; /*** * * @param {number} x * @param {number} y * @returns {CContainerBox} */ CContainerBox.prototype.setPosition = function (x, y) { if (x === 0 && y === 0) {} else { this.$g.attr('transform', 'translate(' + x + ',' + y + ')'); } this._x = x; this._y = y; }; Object.defineProperty(CContainerBox.prototype, 'width', { /*** * * @param {number} width */ set: function (width) { this.setSize(width, this._height); }, /*** * * @return {number} */ get: function () { return this._width; } }); Object.defineProperty(CContainerBox.prototype, 'height', { /*** * * @param {number} height */ set: function (height) { this.setSize(this._width, height); }, /*** * * @return {number} */ get: function () { return this._height; } }); Object.defineProperty(CContainerBox.prototype, 'size', { /*** * * @param {{width: number, height:number}} size */ set: function (size) { this.setSize(size.width, size.height); }, /*** * * @return {{width: number, height: number}} */ get: function () { return { width: this._width, height: this._height }; } }); Object.defineProperty(CContainerBox.prototype, 'x', { /*** * * @param {number} x */ set: function (x) { this.setPosition(x, this._y); }, /*** * * @return {number} */ get: function () { return this._x; } }); Object.defineProperty(CContainerBox.prototype, 'y', { /*** * * @param {number} y */ set: function (y) { this.setPosition(this._x, y); }, /*** * * @return {number} */ get: function () { return this._y; } }); Object.defineProperty(CContainerBox.prototype, 'position', { /*** * * @param {{x: number, y:number}} position */ set: function (position) { this.setPosition(position.x, position.y); }, /*** * * @return {{x: number, y:number}} */ get: function () { return { x: this._x, y: this._y }; } }); var _default = CContainerBox; exports.default = _default;