Fix projection switch timing causing panning issues
This commit is contained in:
parent
842854967d
commit
8e18a7393f
@ -15,7 +15,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<script lang="ts">
|
<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 {DynmapWorldMap} from "@/dynmap";
|
||||||
import {Map} from 'leaflet';
|
import {Map} from 'leaflet';
|
||||||
import {useStore} from "@/store";
|
import {useStore} from "@/store";
|
||||||
@ -87,11 +87,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
watch(active, (newValue) => newValue ? enableLayer() : disableLayer());
|
watch(active, (newValue) => newValue ? enableLayer() : disableLayer());
|
||||||
|
|
||||||
onMounted(() => {
|
if(active.value) {
|
||||||
if(active.value) {
|
enableLayer();
|
||||||
enableLayer();
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
disableLayer();
|
disableLayer();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user