|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="canvas-layout">
|
|
|
- <p v-if="currentMeterPerPixel" class="meterPerPixel">1: {{ currentMeterPerPixel }}</p>
|
|
|
+ <p v-if="currentMeterPerPixel && viewStatus" class="meterPerPixel">1: {{ currentMeterPerPixel }}</p>
|
|
|
<div class="scene-canvas" ref="sceneLayoutRef" />
|
|
|
</div>
|
|
|
</template>
|
|
@@ -18,7 +18,12 @@ import { sceneSeting } from "@/store/sceneSeting";
|
|
|
const emit = defineEmits<{ (e: "loaded"): void }>();
|
|
|
const sceneLayoutRef = ref<HTMLCanvasElement>();
|
|
|
const active = ref(true);
|
|
|
-
|
|
|
+const props = defineProps({
|
|
|
+ viewStatus: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
+});
|
|
|
onActivated(() => (active.value = true));
|
|
|
onDeactivated(() => (active.value = false));
|
|
|
|
|
@@ -48,9 +53,7 @@ onMounted(async () => {
|
|
|
emit("loaded");
|
|
|
|
|
|
sdk.scene.on("posChange", (pos) => {
|
|
|
- currentMeterPerPixel.value = pos.meterPerPixel
|
|
|
- ? Math.round(1 / pos.meterPerPixel)
|
|
|
- : null;
|
|
|
+ currentMeterPerPixel.value = pos.meterPerPixel ? Math.round(1 / pos.meterPerPixel) : null;
|
|
|
});
|
|
|
|
|
|
if (!sceneSeting.value) {
|
|
@@ -74,9 +77,7 @@ onMounted(async () => {
|
|
|
// 90
|
|
|
setTimeout(() => {
|
|
|
watchEffect(() => {
|
|
|
- const doms = Array.from(
|
|
|
- sceneLayoutRef.value.querySelectorAll("#navCube, #home")
|
|
|
- ) as HTMLElement[];
|
|
|
+ const doms = Array.from(sceneLayoutRef.value.querySelectorAll("#navCube, #home")) as HTMLElement[];
|
|
|
if (!disabledMap.mode) {
|
|
|
if (customMap.mode === Mode.pano) {
|
|
|
doms.forEach((dom) => {
|