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

Method attach

codebase/dhtmlxscheduler.es.js:6607–6622  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

6605 this.delayHide();
6606 }
6607 attach(i) {
6608 let t = document.body;
6609 const n = this._scheduler, s = n.$domHelpers;
6610 i.global || (t = n.$root);
6611 let a = null;
6612 const o = (_) => {
6613 const r = s.getTargetNode(_), d = s.closest(r, i.selector);
6614 if (s.isChildOf(r, this.tooltip.getNode()))
6615 return;
6616 const l = () => {
6617 a = d, i.onmouseenter(_, d);
6618 };
6619 n._mobile && n.config.touch_tooltip && (d ? l() : i.onmouseleave(_, d)), a ? d && d === a ? i.onmousemove(_, d) : (i.onmouseleave(_, a), a = null, d && d !== a && l()) : d && l();
6620 };
6621 this.detach(i.selector), this._domEvents.attach(t, "mousemove", o), this._listeners[i.selector] = { node: t, handler: o };
6622 }
6623 detach(i) {
6624 const t = this._listeners[i];
6625 t && this._domEvents.detach(t.node, "mousemove", t.handler);

Callers 7

tooltipForMethod · 0.95
_renderCalendarHeaderMethod · 0.45
_renderDayGridMethod · 0.45
_renderMonthGridMethod · 0.45
_renderYearGridMethod · 0.45
eaFunction · 0.45

Calls 1

detachMethod · 0.95

Tested by

no test coverage detected