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-svg__js__svg__GViewBoxGrid.js
/*** module: node_modules/absol-svg/js/svg/GViewBoxGrid.js ***/
"use strict";

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

var _Core = _interopRequireWildcard(require("./Core"));

var _Turtle = _interopRequireDefault(require("../controller/Turtle"));

require("../../css/svg.css");




/***
 * @extends AElementNS
 * @constructor
 */
function GViewBoxGrid() {
  /***
   *
   * @type {null| SvgViewBox}
   */
  this.$svg = null;
  /**
   *
   * @type {AElementNS}
   */

  this.$primary = this.childNodes[0];
  /**
   *
   * @type {AElementNS}
   */

  this.$secondary = this.childNodes[1];
}

GViewBoxGrid.tag = 'GViewBoxGrid'.toLowerCase();

GViewBoxGrid.render = function () {
  return (0, _Core._)({
    tag: 'g',
    class: 'ag-view-box-grid',
    child: ['path.ag-view-box-grid-primary', 'path.ag-view-box-grid-secondary']
  });
};

GViewBoxGrid.prototype.update = function () {
  if (!this.$svg) return;
  var viewBox = this.$svg.box.viewBox;
  var clientRect = this.$svg.box.clientRect;
  var zoom = this.$svg.box.zoom;
  var primary = new _Turtle.default();
  var secondary = new _Turtle.default();
  var x0 = Math.floor((viewBox.x - viewBox.width) / 100) * 100;
  var y0 = Math.floor((viewBox.y - viewBox.height) / 100) * 100;
  var xM = Math.ceil((viewBox.x + viewBox.width * 2) / 100) * 100;
  var yM = Math.ceil((viewBox.y + viewBox.height * 2) / 100) * 100;
  var dy = yM - y0;
  var dx = xM - x0;
  var x = x0,
      y = y0;
  var i = 0;

  while (x < xM) {
    if (i % 8 === 0) {
      primary.moveTo(x, y0).vLineBy(dy);
    } else {
      secondary.moveTo(x, y0).vLineBy(dy);
    }

    x += 12.5;
    ++i;
  }

  i = 0;

  while (y < yM) {
    if (i % 8 === 0) {
      primary.moveTo(x0, y).hLineBy(dx);
    } else {
      secondary.moveTo(x0, y).hLineBy(dx);
    }

    y += 12.5;
  }

  this.addStyle('--zoom-rev', 1 / zoom + '');
  this.$primary.attr('d', primary.getPath());
  this.$secondary.attr('d', secondary.getPath());
};

_Core.default.install(GViewBoxGrid);

var _default = GViewBoxGrid;
exports.default = _default;

VaKeR 2022