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

Method onEventClick

codebase/sources/dhtmlxscheduler.es.js:13738–13755  ·  view source on GitHub ↗
(event2)

Source from the content-addressed store, hash-verified

13736 this.scheduler = scheduler2;
13737 }
13738 onEventClick(event2) {
13739 if (this._markers && this._markers.length > 0) {
13740 for (let i = 0; i < this._markers.length; i++) {
13741 const popup = this._markers[i].marker.getPopup();
13742 if (popup.isOpen()) {
13743 popup.remove();
13744 }
13745 if (event2.id == this._markers[i].event.id) {
13746 this._markers[i].marker.togglePopup();
13747 if (event2.lat && event2.lng) {
13748 this.setView(event2.lat, event2.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);
13749 } else {
13750 this.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);
13751 }
13752 }
13753 }
13754 }
13755 }
13756 initialize(container, options) {
13757 let scheduler2 = this.scheduler;
13758 mapboxgl.accessToken = options.accessToken;

Callers 1

attachSchedulerEventsFunction · 0.45

Calls 1

setViewMethod · 0.95

Tested by

no test coverage detected