MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / zt

Function zt

codebase/dhtmlxscheduler.es.js:962–1003  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

960 };
961}
962function zt(e) {
963 function i(a) {
964 return a.isConnected !== void 0 ? a.isConnected : document.body.contains(a);
965 }
966 function t(a) {
967 return { w: a.innerWidth || document.documentElement.clientWidth, h: a.innerHeight || document.documentElement.clientHeight };
968 }
969 function n(a, o) {
970 var _, r = t(o);
971 a.event(o, "resize", function() {
972 clearTimeout(_), _ = setTimeout(function() {
973 if (i(a.$container) && !a.$destroyed) {
974 var d, l, h = t(o);
975 l = h, ((d = r).w != l.w || d.h != l.h) && (r = h, s(a));
976 }
977 }, 150);
978 });
979 }
980 function s(a) {
981 a.$initialized && !a.$destroyed && a.$root && i(a.$root) && a.callEvent("onSchedulerResize", []) && (a.updateView(), a.callEvent("onAfterSchedulerResize", []));
982 }
983 (function(a) {
984 var o = a.$container;
985 if (window.getComputedStyle(o).getPropertyValue("position") == "static" && (o.style.position = "relative"), window.ResizeObserver) {
986 let r = !0;
987 const d = new ResizeObserver(function(l) {
988 r ? r = !1 : s(a);
989 });
990 d.observe(o), a.attachEvent("onDestroy", function() {
991 d.unobserve(o);
992 });
993 } else {
994 var _ = document.createElement("iframe");
995 _.className = "scheduler_container_resize_watcher", _.tabIndex = -1, a.config.wai_aria_attributes && (_.setAttribute("role", "none"), _.setAttribute("aria-hidden", !0)), window.Sfdc || window.$A || window.Aura ? function(r) {
996 var d = r.$root.offsetHeight, l = r.$root.offsetWidth;
997 (function h() {
998 r.$destroyed || (r.$root && (r.$root.offsetHeight == d && r.$root.offsetWidth == l || s(r), d = r.$root.offsetHeight, l = r.$root.offsetWidth), setTimeout(h, 200));
999 })();
1000 }(a) : (o.appendChild(_), _.contentWindow ? n(a, _.contentWindow) : (o.removeChild(_), n(a, window)));
1001 }
1002 })(e);
1003}
1004class qt {
1005 constructor() {
1006 this._silent_mode = !1, this.listeners = {};

Callers 1

eaFunction · 0.70

Calls 3

sFunction · 0.70
nFunction · 0.70
attachEventMethod · 0.65

Tested by

no test coverage detected