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

Function checkIfMaterialSkin

codebase/sources/dhtmlxscheduler.js:7514–7537  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7512 };
7513 var calculatedMaterial;
7514 function checkIfMaterialSkin() {
7515 if (calculatedMaterial === void 0) {
7516 var probe = document.createElement("div");
7517 probe.style.position = "absolute";
7518 probe.style.left = "-9999px";
7519 probe.style.top = "-9999px";
7520 probe.innerHTML = "<div class='dhx_cal_container'><div class='dhx_cal_scale_placeholder'></div><div>";
7521 document.body.appendChild(probe);
7522 var styles = window.getComputedStyle(probe.querySelector(".dhx_cal_scale_placeholder"));
7523 var position = styles.getPropertyValue("position");
7524 if (position === "absolute") {
7525 calculatedMaterial = true;
7526 } else {
7527 calculatedMaterial = false;
7528 }
7529 setTimeout(function() {
7530 calculatedMaterial = null;
7531 if (probe && probe.parentNode) {
7532 probe.parentNode.removeChild(probe);
7533 }
7534 }, 500);
7535 }
7536 return calculatedMaterial;
7537 }
7538 var cachedBorderBoxValue;
7539 function checkIfBorderBoxStyling() {
7540 if (scheduler2._is_material_skin()) {

Callers 1

extend$3Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected