UNPKG

visual-js

Version:

[3.0.26] Prepare for npm usage. Special integration for matrix engine 1.9.0 Thunder.

22 lines (19 loc) 559 B
/** * Class ONRESIZE representing a callback method when * window.onresize trigger * Override it: * @method ONRESIZE */ import SYS from "../system"; export function ONRESIZE() {} export function attachResize () { window.onresize = function (e) { if (SYS.DOM.RESIZE_TYPE == "DIAMETRIC") { SYS.DOM.c.width = window.innerWidth - 1; // CONVERTOR.PER_TO_PIX( SYS.DOM.W_PIX); SYS.DOM.c.height = window.innerHeight; // CONVERTOR.PER_TO_PIY( SYS.DOM.H_PIX); } ONRESIZE(); }; }