Commit 07fc338a authored by Michael Underwood's avatar Michael Underwood
Browse files

Update @types/leaflet and remove old workarounds

parent 50191fe8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
  "devDependencies": {
    "@rushstack/eslint-patch": "^1.2.0",
    "@trivago/prettier-plugin-sort-imports": "^4.1.1",
    "@types/leaflet": "^1.5.7",
    "@types/leaflet": "^1.9.3",
    "@types/node": "^18.13.0",
    "@vitejs/plugin-vue": "^4.0.0",
    "@vue/compiler-dom": "^3.2.47",
+1 −2
Original line number Diff line number Diff line
@@ -351,8 +351,7 @@ export default defineComponent({
          }
          const oldBounds =
            blueprint.lastSetBounds || blueprint.leafletRef!.getBounds();
          // TODO: Remove `as any` if @types/leaflet adds the second argument to the method signature
          const boundsChanged = !(oldBounds as any).equals(newBounds, 0); // set maxMargin to 0 - check exact equals
          const boundsChanged = !oldBounds.equals(newBounds, 0); // set maxMargin to 0 - check exact equals
          if (boundsChanged) {
            blueprint.lastSetBounds = newBounds;
            blueprint.leafletRef!.fitBounds(newBounds);
+1 −2
Original line number Diff line number Diff line
@@ -37,8 +37,7 @@ export const layerProps = {
  },
} as const;

// TODO: Remove extra {options} definition if @types/leaflet updates to include it on Layer
export const setupLayer = <T extends L.Layer & { options: L.LayerOptions }>(
export const setupLayer = <T extends L.Layer>(
  props,
  leafletRef: Ref<T>,
  context