Fix projection switch timing causing panning issues

This commit is contained in:
James Lyne 2020-12-21 18:38:58 +00:00
parent 842854967d
commit 8e18a7393f

View File

@ -15,7 +15,7 @@
-->
<script lang="ts">
import {defineComponent, onMounted, onUnmounted, computed, watch} from "@vue/runtime-core";
import {defineComponent, onUnmounted, computed, watch} from "@vue/runtime-core";
import {DynmapWorldMap} from "@/dynmap";
import {Map} from 'leaflet';
import {useStore} from "@/store";
@ -87,11 +87,10 @@ export default defineComponent({
watch(active, (newValue) => newValue ? enableLayer() : disableLayer());
onMounted(() => {
if(active.value) {
enableLayer();
}
});
if(active.value) {
enableLayer();
}
onUnmounted(() => {
disableLayer();