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

Function _setMapSize

codebase/sources/dhtmlxscheduler.js:14053–14074  ·  view source on GitHub ↗
(elem_id)

Source from the content-addressed store, hash-verified

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

Callers 1

map_viewFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected