Skip to content

Commit 72139cf

Browse files
committed
fix(ol-webgl-tile-layer): make TileLayer a computed
closes #310
1 parent 12f3d93 commit 72139cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/layers/OlWebglTileLayer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<script setup lang="ts">
88
import type { Ref } from "vue";
9-
import { inject, provide, onUnmounted, onMounted, watch, ref } from "vue";
9+
import { inject, provide, onUnmounted, onMounted, watch, computed } from "vue";
1010
import TileLayer, { type Options } from "ol/layer/WebGLTile";
1111
import type Map from "ol/Map";
1212
import type { OverviewMap } from "ol/control";
@@ -23,7 +23,7 @@ const overViewMap = inject<Ref<OverviewMap | null> | null>("overviewMap", null);
2323
2424
const { properties } = usePropsAsObjectProperties(props);
2525
26-
const tileLayer = ref(new TileLayer(properties));
26+
const tileLayer = computed(() => new TileLayer(properties));
2727
2828
watch(
2929
() => props.opacity,

0 commit comments

Comments
 (0)