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

Function setUserLocation

codebase/sources/dhtmlxscheduler.es.js:13897–13907  ·  view source on GitHub ↗
(options, adapter)

Source from the content-addressed store, hash-verified

13895 return event2;
13896 }
13897 function setUserLocation(options, adapter) {
13898 if (options.resolve_user_location) {
13899 if (navigator.geolocation) {
13900 navigator.geolocation.getCurrentPosition(function(position) {
13901 adapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);
13902 });
13903 }
13904 } else {
13905 adapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);
13906 }
13907 }
13908 scheduler2.dblclick_dhx_map_area = function(e) {
13909 let eventNode = e.target.closest(`[${scheduler2.config.event_attribute}]`);
13910 if (eventNode) {

Callers 1

map_viewFunction · 0.70

Calls 1

setViewMethod · 0.45

Tested by

no test coverage detected