VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-full/dist/js/mdls__absol-form__js__layouts__HyperLayout.js
/*** module: node_modules/absol-form/js/layouts/HyperLayout.js ***/
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _BaseLayout = _interopRequireDefault(require("../core/BaseLayout"));

var _inheritComponentClass = _interopRequireDefault(require("../core/inheritComponentClass"));

var _RelativeLayout = _interopRequireDefault(require("./RelativeLayout"));

var _Assembler = require("../core/Assembler");

var _FCore = require("../core/FCore");

var _HyperAnchor = _interopRequireDefault(require("./anchors/HyperAnchor"));

var _Rectangle = _interopRequireDefault(require("absol/src/Math/Rectangle"));

var _Vec = _interopRequireDefault(require("absol/src/Math/Vec2"));


/**
 * @extends BaseLayout
 * @constructor
 */
function HyperLayout() {
  _BaseLayout.default.call(this);
}

(0, _inheritComponentClass.default)(HyperLayout, _BaseLayout.default);
HyperLayout.prototype.tag = 'HyperLayout';
HyperLayout.prototype.menuIcon = 'span.mdi.mdi-tangram';
HyperLayout.prototype.TOP_CLASS_NAME = 'as-hyper-layout';

HyperLayout.prototype.render = function () {
  return (0, _FCore._)({
    class: this.TOP_CLASS_NAME
  });
};

HyperLayout.prototype.style.contentAlign = 'left';
HyperLayout.prototype.styleHandlers.contentAlign = {
  set: function (value) {
    if (!['left', 'center', 'right'].includes(value)) value = 'left';

    switch (value) {
      case 'right':
        this.domElt.removeClass('as-content-align-center').addClass('as-content-align-right');
        break;

      case 'center':
        this.domElt.removeClass('as-content-align-right').addClass('as-content-align-center');
        break;

      default:
        this.domElt.removeClass('as-content-align-center').removeClass('as-content-align-right');
    }

    return value;
  },
  export: function (ref) {
    var value = ref.get();
    if (value === this.constructor.prototype.style.contentAlign) value = undefined;
    return value || undefined;
  },
  descriptor: {
    type: 'enum',
    values: ['left', 'center', 'right']
  }
};

HyperLayout.prototype.onAddChild = function (child, index) {
  var anchor = new _HyperAnchor.default(child);

  if (index === this.domElt.childNodes.length) {
    this.domElt.addChild(child.domElt);
  } else {
    this.domElt.addChildBefore(child.domElt, this.domElt.childNodes[index]);
  }
};

HyperLayout.prototype.onRemoveChild = function (child, index) {
  child.domElt.remove();
  child.anchor.destroy();
};

_Assembler.AssemblerInstance.addClass(HyperLayout);

var _default = HyperLayout;
exports.default = _default;

VaKeR 2022