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__src__AppPattern__Application.js
/*** module: node_modules/absol/src/AppPattern/Application.js ***/
"use strict";

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

var _ContextManager = _interopRequireDefault(require("./ContextManager"));

var _Context = _interopRequireDefault(require("./Context"));


/**
 * @class
 */
function Application() {
  _Context.default.call(this);

  this.activityStack = [];
  /** @type {Activity} */

  this.currentActivity = null;
}

Object.defineProperties(Application.prototype, Object.getOwnPropertyDescriptors(_Context.default.prototype));
Application.prototype.constructor = Application;
/**
 * @param {Activity} activity
 */

Application.prototype.startActivity = function (activity) {
  if (this.currentActivity != null) {
    this.currentActivity.pause();
    this.activityStack.push(this.currentActivity);
  }

  this.currentActivity = activity;
  this.appendChild(activity);
  activity.attach(this);
  this.setContentView(activity.getView(), true);
  activity.start();
};
/**
 * @param {Activity} activity
 */


Application.prototype.stopActivity = function (activity) {
  if (this.currentActivity == activity) {
    if (this.activityStack.length == 0) {//todo
    } else {
      activity.detach();
      this.removeChild(this.currentActivity);
      this.currentActivity = this.activityStack.pop();
      this.setContentView(this.currentActivity.getView());
      this.currentActivity.resume();
    }
  } else {
    console.error("NOT ON TOP ACTIVITY");
  }
};
/**
 * @param {HTMLElement} view
 */


Application.prototype.setContentView = function (view, overlay) {
  throw new Error("Not Implement!");
};

Application.prototype.backToTopActivity = function () {
  while (this.activityStack.length > 0) {
    this.currentActivity.stop();
    this.currentActivity = this.activityStack.pop();
  }

  this.setContentView(this.currentActivity.getView());
  this.currentActivity.resume();
};

var _default = Application;
exports.default = _default;

VaKeR 2022