bill 4 dienas atpakaļ
vecāks
revīzija
1c4b1008bf

+ 1 - 2
src/components/tagging/sign-new.vue

@@ -155,8 +155,7 @@ tag.bus.on("changePosition", (data) => {
   );
   changePos();
 });
-tag.bus.on("transformChanged", (change) => change && changePos());
-tag.bus.on("scaleChanged", (change) => change && changePos());
+tag.bus.on("scaleChanged", () => changePos());
 
 tag.bus.on("changePosition", (data) => {
   clearTimeout(changeTimeout);

+ 11 - 11
src/env/index.ts

@@ -1,5 +1,5 @@
 import { stackFactory, flatStacksValue, strToParams } from "@/utils";
-import { reactive, ref } from "vue";
+import { reactive, ref, watch, watchEffect } from "vue";
 
 import type { FuseModel, Path, TaggingPosition, View } from "@/store";
 export const namespace = "/fusion";
@@ -62,9 +62,10 @@ export const custom = flatStacksValue({
   showMode: showModeStack,
   showSearch: showSearchStack,
   showViewSetting: showViewSettingStack,
-  full: showFullStack
+  full: showFullStack,
 });
 
+export const paramsRaw = strToParams(location.search) as unknown as Params
 export const params = reactive(
   strToParams(location.search)
 ) as unknown as Params;
@@ -72,11 +73,10 @@ params.caseId = Number(params.caseId);
 params.share = Boolean(Number(params.share));
 params.single = Boolean(Number(params.single));
 
-
 export type Params = {
   caseId: number;
   baseURL?: string;
-  pure?: boolean
+  pure?: boolean;
   modelId?: string;
   mapKey?: string;
   mapPlatform?: string;
@@ -103,10 +103,10 @@ export const getResource = (uri: string) => {
     return `${baseURL}/${uri}`;
   }
 };
-
-
-
-if (params.pure) {
-  showFullStack.current.value.value = true
-  console.error()
-}
+watch(
+  () => params.pure || false,
+  (pure, _, onCleanup) => {
+    onCleanup(showFullStack.push(ref(pure)));
+  },
+  { immediate: true }
+);

+ 2 - 1
src/layout/model-list/mode-tab.vue

@@ -1,6 +1,7 @@
 <template>
   <div
     class="mode-tab strengthen"
+     :class="{ pure: params.pure }"
     v-if="panoModel && currentModel === fuseModel && custom.showModeTab"
   >
     <div
@@ -21,7 +22,7 @@
 </template>
 
 <script lang="ts" setup>
-import { custom } from "@/env";
+import { custom, params } from "@/env";
 import { getSupperPanoModel } from "@/sdk/association";
 import { currentModel, fuseModel } from "@/model";
 import { flyModel } from "@/hook/use-fly";

+ 4 - 0
src/layout/model-list/style.scss

@@ -55,6 +55,10 @@
   left            : calc(var(--left-pano-left) + var(--left-pano-width));
   padding         : 0 5px;
 
+  &.pure {
+    left: 10px;
+  }
+
   .mode-icon-layout {
     padding: 0 8px;
 

+ 11 - 5
src/layout/show/index.vue

@@ -2,8 +2,8 @@
   <template v-if="loaded">
     <ui-icon
       class="screen-full"
-      v-if="params.pure"
-      :class="{ pure: params.pure }"
+      :class="{ fullScreen, pure: paramsRaw.pure }"
+      v-if="paramsRaw.pure"
       style="margin-right: 10px"
       :type="fullScreen ? 'window_n' : 'window_m'"
       ctrl
@@ -33,7 +33,7 @@
 <script lang="ts" setup>
 import GlobalSearch from "@/components/global-search/index.vue";
 import ViewSetting from "@/components/view-setting/index.vue";
-import { custom, params, showRightPanoStack } from "@/env";
+import { custom, params, paramsRaw, showRightPanoStack } from "@/env";
 import { ref, watchEffect } from "vue";
 import { router, RoutesName } from "@/router";
 import { loadModel, fuseModel } from "@/model";
@@ -76,19 +76,22 @@ const fullHandler = async () => {
   if (quit) {
     quit();
     fullScreen.value = false;
+    params.pure = true;
     quit = null;
   } else {
     quit = await fullView(() => {
       fullScreen.value = false;
+      params.pure = true;
       quit = null;
-    });
+    }, false);
     fullScreen.value = true;
+    params.pure = false;
   }
 };
 
 const loaded = ref(false);
 const initialSys = async () => {
-    await initialTaggingStyles()
+  await initialTaggingStyles();
   await Promise.all([
     initialFuseModels(),
     initialScenes(),
@@ -149,5 +152,8 @@ watchEffect((onCleanup) => {
   z-index: 999;
   font-size: 22px;
   color: #fff !important;
+  &.fullScreen {
+    right: calc(var(--editor-menu-right) + var(--editor-toolbox-width) + 20px);
+  }
 }
 </style>

+ 7 - 0
src/sdk/association/fuseMode.ts

@@ -18,9 +18,12 @@ import {
   SceneStatus,
   FuseModel,
   FuseModels,
+  taggings,
+  taggingPositions,
 } from "@/store";
 import { currentLayout, RoutesName } from "@/router";
 import { unsetFactory } from "@/utils/unset";
+import { getTaggingPosNode, taggingGroup } from "./tagging";
 
 const us = unsetFactory()
 
@@ -108,6 +111,10 @@ const setModels = (sdk: SDK, models: FuseModels, oldModels: FuseModels) => {
         // }
         if (transform.scale) {
           transform.scale = round(transform.scale, 2);
+
+          taggingPositions.value.forEach(position => {
+            getTaggingPosNode(position)?.bus.emit('scaleChanged', true)
+          })
         }
 
         const updateKeys = Object.keys(transform);

+ 3 - 3
src/utils/full.ts

@@ -4,8 +4,8 @@ import { ref, watch } from "vue";
 import { isEdit, sysBus } from "@/store";
 
 export const currentIsFullView = ref(false)
-export const fullView = async (fn: () => void) => {
-  const popViewMode = togetherCallback([
+export const fullView = async (fn: () => void, fullMode = true) => {
+  const popViewMode = fullMode && togetherCallback([
     viewModeStack.push(ref("full")),
     showLeftPanoStack.push(ref(false)),
     showBottomBarStack.push(ref(false))
@@ -30,7 +30,7 @@ export const fullView = async (fn: () => void) => {
   }
 
   return () => {
-    popViewMode();
+    popViewMode && popViewMode();
     console.log('0.0', isFull)
     if (isFull) {
       currentIsFullView.value = false

+ 1 - 1
src/views/security/mode.vue

@@ -21,7 +21,7 @@
 
 <script lang="ts" setup>
 import { computed, watchEffect } from "vue";
-import { custom } from "@/env";
+import { custom, params } from "@/env";
 import { activeModel, getSupperPanoModel } from "@/sdk/association";
 import { fuseModels, getFuseModelShowVariable } from "@/store";
 import type { FuseModel } from "@/store";