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

Function showEventWhenPossible

codebase/sources/dhtmlxscheduler.js:21155–21177  ·  view source on GitHub ↗
(eventId)

Source from the content-addressed store, hash-verified

21153 document.location.hash = "#" + values.join(",");
21154 }
21155 function showEventWhenPossible(eventId) {
21156 if (!eventId) {
21157 return;
21158 }
21159 const tryShowNow = function() {
21160 if (scheduler2.$destroyed) {
21161 return;
21162 }
21163 if (scheduler2.getEvent(eventId)) {
21164 scheduler2.showEvent(eventId);
21165 return true;
21166 }
21167 return false;
21168 };
21169 if (tryShowNow()) {
21170 return;
21171 }
21172 const onLoadedId = scheduler2.attachEvent("onParse", function() {
21173 tryShowNow();
21174 scheduler2.detachEvent(onLoadedId);
21175 return true;
21176 });
21177 }
21178 let pendingSelectedEventId = null;
21179 scheduler2.attachEvent("onSchedulerReady", function() {
21180 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