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

Function showEventWhenPossible

codebase/sources/dhtmlxscheduler.es.js:21151–21173  ·  view source on GitHub ↗
(eventId)

Source from the content-addressed store, hash-verified

21149 document.location.hash = "#" + values.join(",");
21150 }
21151 function showEventWhenPossible(eventId) {
21152 if (!eventId) {
21153 return;
21154 }
21155 const tryShowNow = function() {
21156 if (scheduler2.$destroyed) {
21157 return;
21158 }
21159 if (scheduler2.getEvent(eventId)) {
21160 scheduler2.showEvent(eventId);
21161 return true;
21162 }
21163 return false;
21164 };
21165 if (tryShowNow()) {
21166 return;
21167 }
21168 const onLoadedId = scheduler2.attachEvent("onParse", function() {
21169 tryShowNow();
21170 scheduler2.detachEvent(onLoadedId);
21171 return true;
21172 });
21173 }
21174 let pendingSelectedEventId = null;
21175 scheduler2.attachEvent("onSchedulerReady", function() {
21176 const initialState = scheduler2._get_url_nav();

Callers 1

urlFunction · 0.70

Calls 3

tryShowNowFunction · 0.70
attachEventMethod · 0.65
detachEventMethod · 0.65

Tested by

no test coverage detected