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

Function _setMapSize

codebase/sources/dhtmlxscheduler.es.js:14049–14070  ·  view source on GitHub ↗
(elem_id)

Source from the content-addressed store, hash-verified

14047 }
14048 };
14049 function _setMapSize(elem_id) {
14050 let map2 = document.getElementById(elem_id);
14051 if (map2) {
14052 const nav_height = scheduler2.$container.querySelector(".dhx_cal_navline").offsetHeight;
14053 let height = scheduler2.$container.querySelector(".dhx_cal_data").offsetHeight + scheduler2.$container.querySelector(".dhx_cal_header").offsetHeight;
14054 if (height < 0)
14055 height = 0;
14056 let width = scheduler2._x - scheduler2.xy.map_date_width - scheduler2.xy.map_description_width - 1;
14057 if (width < 0)
14058 width = 0;
14059 map2.style.height = height + "px";
14060 map2.style.width = width + "px";
14061 map2.style.position = "absolute";
14062 map2.style.top = nav_height + "px";
14063 if (scheduler2.config.rtl) {
14064 map2.style.marginRight = scheduler2.xy.map_date_width + scheduler2.xy.map_description_width + 1 + "px";
14065 } else {
14066 map2.style.marginLeft = scheduler2.xy.map_date_width + scheduler2.xy.map_description_width + 1 + "px";
14067 }
14068 map2.style.marginTop = scheduler2.xy.nav_height + 2 + "px";
14069 }
14070 }
14071 function fill_map_tab() {
14072 let events = scheduler2.get_visible_events();
14073 events.sort(function(a, b) {

Callers 1

map_viewFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected