Cleanup
This commit is contained in:
parent
025ecf6148
commit
6dfaaabf70
@ -51,7 +51,7 @@ export default defineComponent({
|
|||||||
currentZoom = computed(() => store.state.currentZoom),
|
currentZoom = computed(() => store.state.currentZoom),
|
||||||
|
|
||||||
location = computed(() => {
|
location = computed(() => {
|
||||||
if(!event.value) {
|
if (!event.value) {
|
||||||
return {x: 0, y: 0, z: 0}
|
return {x: 0, y: 0, z: 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
//Url to copy
|
//Url to copy
|
||||||
url = computed(() => {
|
url = computed(() => {
|
||||||
if(!currentWorld.value || !currentMap.value) {
|
if (!currentWorld.value || !currentMap.value) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ export default defineComponent({
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
style = computed(() => {
|
style = computed(() => {
|
||||||
if(!menuElement.value || !event.value) {
|
if (!menuElement.value || !event.value) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,6 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handleEsc = (e: KeyboardEvent) => {
|
const handleEsc = (e: KeyboardEvent) => {
|
||||||
console.log(e);
|
|
||||||
if (e.key === "Escape") {
|
if (e.key === "Escape") {
|
||||||
closeContextMenu();
|
closeContextMenu();
|
||||||
}
|
}
|
||||||
@ -110,13 +109,13 @@ export default defineComponent({
|
|||||||
event.value = null;
|
event.value = null;
|
||||||
},
|
},
|
||||||
pan = () => {
|
pan = () => {
|
||||||
if(event.value) {
|
if (event.value) {
|
||||||
props.leaflet.panTo(event.value.latlng);
|
props.leaflet.panTo(event.value.latlng);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(menuVisible, visible => {
|
watch(menuVisible, visible => {
|
||||||
if(visible) {
|
if (visible) {
|
||||||
requestAnimationFrame(() => locationButton.value && locationButton.value.focus());
|
requestAnimationFrame(() => locationButton.value && locationButton.value.focus());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user