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

Function checkIfMaterialSkin

codebase/sources/dhtmlxscheduler.es.js:7510–7533  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

extend$3Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected