![]() 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-tutor/js/dom/BlinkMask.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; require("../../css/blinkmask.css"); var _AElement = _interopRequireDefault(require("absol/src/HTML5/AElement")); var _Core = _interopRequireWildcard(require("./Core")); var _ResizeSystem = _interopRequireDefault(require("absol/src/HTML5/ResizeSystem")); var _Icon = require("./Icon"); var _PuncturedModal = _interopRequireDefault(require("./PuncturedModal")); /*** * @extends PuncturedModal * @constructor */ function BlinkMask() { this.$target = null; this.$trackScrollParents = []; this._handlePositionChange = this._handlePositionChange.bind(this); this.$attachhook = (0, _Core.$)('attachhook', this); this.$attachhook.requestUpdateSize = this._handlePositionChange; ; this._updateTimeout = -1; } BlinkMask.tag = 'BlinkMask'.toLowerCase(); BlinkMask.render = function () { return (0, _Core._)({ extendEvent: 'positionchange', class: ['atr-blink-mask', 'as-anim'], child: ['attachhook'] }); }; BlinkMask.prototype.follow = function () { var lastTargetElt = this.$target; var res = _PuncturedModal.default.prototype.follow.apply(this, arguments); var currentTarget = this.$target; if (lastTargetElt !== currentTarget && currentTarget) { this.removeClass('as-anim'); setTimeout(function () { if (this.$target === currentTarget) { this.addClass('as-anim'); } }.bind(this), 0); } return res; }; BlinkMask.prototype.stopTrackPosition = _PuncturedModal.default.prototype.stopTrackPosition; BlinkMask.prototype._handlePositionChange = function (event) { if (!this.$target) return; var thisM = this; if (this._updateTimeout > 0) clearTimeout(this._updateTimeout); var bound = undefined; function update() { thisM._updateTimeout = -1; if (!thisM.$target) return; var bound1 = thisM.$target.getBoundingClientRect(); if (!bound || bound1.left !== bound.left || bound1.width !== bound.width || bound1.top !== bound.top || bound1.height !== bound.height) { thisM.addStyle({ left: bound1.left + 'px', top: bound1.top + 'px', width: bound1.width + 'px', height: bound1.height + 'px' }); thisM.emit('positionchange', { target: this, bound: bound }, this); bound = bound1; thisM._updateTimeout = setTimeout(update, 10); } } update(); }; BlinkMask.prototype.reset = function () { this.removeStyle({ left: null, top: null, width: null, height: null }); }; _Core.default.install(BlinkMask); var _default = BlinkMask; exports.default = _default;