![]() 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/CSvgBox.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /*** * * @param {SvgCanvas} $svg * @constructor */ function CSvgBox($svg) { this.$svg = $svg; this._width = 0; this._height = 0; this.width = 0; this.height = 0; } /*** * * @param {number} width * @param {number} height */ CSvgBox.prototype.setSize = function (width, height) { this.$svg.attr('width', width + ''); this.$svg.attr('height', height + ''); this.$svg.attr('viewBox', [-0.5, -0.5, width, height].join(' ')); this._width = width; this._height = height; }; Object.defineProperty(CSvgBox.prototype, 'width', { /*** * * @param {Number} width */ set: function (width) { this.setSize(width, this._height); }, /*** * * @return {number} */ get: function () { return this._width; } }); Object.defineProperty(CSvgBox.prototype, 'height', { /*** * * @param {Number} height */ set: function (height) { this.setSize(this._width, height); }, /*** * * @return {number} */ get: function () { return this._height; } }); Object.defineProperty(CSvgBox.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 }; } }); var _default = CSvgBox; exports.default = _default;