Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zdila committed Sep 1, 2023
1 parent 2eeb195 commit 6696d4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/leaflet-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function createLeafletMapController(
});
}

const ctrl: MapController = {
return {
setEventHandler(handler: undefined | ((e: MapEvent) => void)): void {
if (handler) {
eventHandler = handler;
Expand Down Expand Up @@ -303,7 +303,5 @@ export function createLeafletMapController(

selectedMarker?.getElement()?.classList.toggle("marker-selected", true);
},
};

return ctrl;
} satisfies MapController;
}
6 changes: 2 additions & 4 deletions src/maplibregl-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function createMapLibreGlMapController(
return new maplibregl.Marker({ element, offset: [1, -13] });
}

const ctrl: MapController = {
return {
setEventHandler(handler: undefined | ((e: MapEvent) => void)): void {
if (handler) {
eventHandler = handler;
Expand Down Expand Up @@ -366,7 +366,5 @@ export function createMapLibreGlMapController(

selectedMarker?.getElement().classList.toggle("marker-selected", true);
},
};

return ctrl;
} satisfies MapController;
}
6 changes: 2 additions & 4 deletions src/openlayers-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export function createOpenLayersMapController(
});
};

const ctrl: MapController = {
return {
setEventHandler(handler: undefined | ((e: MapEvent) => void)): void {
if (handler) {
eventHandler = handler;
Expand Down Expand Up @@ -399,7 +399,5 @@ export function createOpenLayersMapController(

prevSelected = index;
},
};

return ctrl;
} satisfies MapController;
}

0 comments on commit 6696d4d

Please sign in to comment.