Fix projection switch timing causing panning issues
This commit is contained in:
parent
842854967d
commit
8e18a7393f
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user