![]() 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-form/js/layouts/ChainLayout.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _FCore = _interopRequireDefault(require("../core/FCore")); var _ChainAnchor = _interopRequireDefault(require("./anchors/ChainAnchor")); var _LinearLayout = _interopRequireDefault(require("./LinearLayout")); var _Assembler = require("../core/Assembler"); var _inheritComponentClass = _interopRequireDefault(require("../core/inheritComponentClass")); var _ = _FCore.default._; function ChainLayout() { _LinearLayout.default.call(this); } (0, _inheritComponentClass.default)(ChainLayout, _LinearLayout.default); ChainLayout.prototype.tag = 'ChainLayout'; ChainLayout.prototype.menuIcon = 'span.mdi.mdi-id-card'; ChainLayout.prototype.TOP_CLASS_NAME = 'as-chain-layout'; ChainLayout.prototype.AnchorClass = _ChainAnchor.default; ChainLayout.prototype.styleHandlers.overflowX = { set: function (value) { if (['visible', 'hidden', 'auto'].indexOf(value) < 0) value = 'visible'; this.view.addStyle('overflowX', value); return value; }, descriptor: { type: 'enum', values: ['visible', 'hidden', 'auto'] }, export: function (ref) { var value = ref.get(); if (value === 'auto') return undefined; return value; } }; ChainLayout.prototype.styleHandlers.hAlignItem = { set: function (value) { if (['left', 'center', 'right'].indexOf(value) <= 0) value = 'left'; if (value === 'left') { this.domElt.removeClass('as-h-align-item-right').removeClass('as-h-align-item-center'); } else if (value === 'center') { this.domElt.addClass('as-h-align-item-center').removeClass('as-h-align-item-right'); } else { this.domElt.removeClass('as-h-align-item-center').addClass('as-h-align-item-right'); } return value; }, descriptor: { type: 'enum', values: ['left', 'center', 'right'] }, export: function (ref) { var value = ref.get(); if (value === 'left') return undefined; return value; } }; ChainLayout.prototype.measureMinSize = function () { var width = 0; var height = 0; var child; for (var i = 0; i < this.children.length; ++i) { child = this.children[i]; var minSize = child.measureMinSize(); width = Math.max(width, child.style.left + minSize.width + child.style.right); height = Math.max(height, child.style.top + minSize.height + child.style.bottom); } return { width: width, height: height }; }; ChainLayout.prototype.render = function () { return _({ class: this.TOP_CLASS_NAME }); }; ChainLayout.prototype.onAddChild = function (child, index) { var anchor = new _ChainAnchor.default(child); if (index === -1 || !this.view.childNodes[index]) { this.domElt.addChild(child.domElt); } else { this.view.addChildBefore(child.domElt, this.domElt.childNodes[index]); } }; ChainLayout.prototype.addChildByPosition = function (child, posX, posY) { var bound = this.view.getBoundingClientRect(); var at = undefined; var x; for (var i = 0; i < this.children.length; ++i) { x = this.children[i].view.getBoundingClientRect().right - bound.left; if (x >= posX) { at = this.children[i]; break; } } if (at) { this.addChildBefore(child, at); } else { this.addChild(child); } }; _Assembler.AssemblerInstance.addClass(ChainLayout); var _default = ChainLayout; exports.default = _default;