mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix: solved breaking error on production with draggable paths in leaflet
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export const initDraggablePath = (L) => {
|
||||
//@ts-ignore
|
||||
L.PathDraggable = L.Draggable.extend({
|
||||
const PathDraggable = L.Draggable.extend({
|
||||
initialize: function (path) {
|
||||
this._path = path;
|
||||
|
||||
@@ -52,7 +52,7 @@ export const initDraggablePath = (L) => {
|
||||
addHooks: function () {
|
||||
if (!this._draggable) {
|
||||
//@ts-ignore
|
||||
this._draggable = new L.PathDraggable(this._path);
|
||||
this._draggable = new PathDraggable(this._path);
|
||||
}
|
||||
|
||||
this._draggable.on(this.getEvents(), this).enable();
|
||||
|
||||
@@ -68,7 +68,7 @@ import { SmokeMarker } from "./markers/smokemarker";
|
||||
/* Register the handler for the box selection */
|
||||
L.Map.addInitHook("addHandler", "boxSelect", BoxSelect);
|
||||
|
||||
//initDraggablePath(L); // TODO: breaks app when compiled
|
||||
initDraggablePath(L); // TODO: breaks app when compiled
|
||||
|
||||
export class Map extends L.Map {
|
||||
/* Options */
|
||||
|
||||
Reference in New Issue
Block a user