mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
huge Laravel 10 upgrade
This commit is contained in:
23
support/laravel-maps/resources/js/utils/dispatchEvent.js
vendored
Normal file
23
support/laravel-maps/resources/js/utils/dispatchEvent.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
export function dispatchEventMapInitialized (serviceName, element, data) {
|
||||
const event = new CustomEvent('LaravelMaps:MapInitialized', {
|
||||
detail: {
|
||||
element: element,
|
||||
map: data.map,
|
||||
markers: data.markers || [],
|
||||
service: serviceName,
|
||||
},
|
||||
});
|
||||
window.dispatchEvent(event);
|
||||
}
|
||||
|
||||
export function dispatchEventMarkerClicked (serviceName, element, map, marker) {
|
||||
const event = new CustomEvent('LaravelMaps:MarkerClicked', {
|
||||
detail: {
|
||||
element: element,
|
||||
map: map,
|
||||
marker: marker,
|
||||
service: serviceName,
|
||||
},
|
||||
});
|
||||
window.dispatchEvent(event);
|
||||
}
|
||||
Reference in New Issue
Block a user