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

Function getPositionInsideScheduler

codebase/sources/dhtmlxscheduler.es.js:15527–15542  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

15525 scheduler2._qi_button_click(node.parentNode);
15526 };
15527 function getPositionInsideScheduler(element) {
15528 let left = 0;
15529 let top = 0;
15530 let node = element;
15531 while (node && node != scheduler2._obj) {
15532 left += node.offsetLeft;
15533 top += node.offsetTop - node.scrollTop;
15534 node = node.offsetParent;
15535 }
15536 if (node) {
15537 let dx = left + element.offsetWidth / 2 > scheduler2._x / 2 ? 1 : 0;
15538 let dy = top + element.offsetHeight / 2 > scheduler2._y / 2 ? 1 : 0;
15539 return { left, top, dx, dy, width: element.offsetWidth, height: element.offsetHeight };
15540 }
15541 return 0;
15542 }
15543 scheduler2._get_event_counter_part = function(id) {
15544 var domEv = scheduler2.getRenderedEvent(id);
15545 return getPositionInsideScheduler(domEv);

Callers 1

quick_infoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected