|
@@ -42,7 +42,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { computed, ref, watch, watchEffect } from "vue";
|
|
|
+import { computed, onUnmounted, ref, watch, watchEffect } from "vue";
|
|
|
import { router, RoutesName } from "@/router";
|
|
|
import UIBubble from "bill/components/bubble/index.vue";
|
|
|
import Images from "@/views/tagging/images.vue";
|
|
@@ -71,7 +71,6 @@ const [posStyle, pos, pause, recovery] = usePixel(() => undefined);
|
|
|
|
|
|
const queryItems = computed(() =>
|
|
|
props.tagging.images.map((image) => ({
|
|
|
- // type: MediaType.img,
|
|
|
url: getResource(getFileUrl(image)),
|
|
|
}))
|
|
|
);
|
|
@@ -96,8 +95,7 @@ watchEffect(() => {
|
|
|
watch(
|
|
|
() => props.scenePos.mat,
|
|
|
(val) => {
|
|
|
- console.log(val, tag);
|
|
|
- // tag.changeMat(val);
|
|
|
+ tag.changeMat(val);
|
|
|
},
|
|
|
{ deep: true }
|
|
|
);
|
|
@@ -157,8 +155,7 @@ tag.bus.on("leave", () => {
|
|
|
tag.bus.on("click", () => iconClickHandler());
|
|
|
|
|
|
const changePos = () => {
|
|
|
- pos.value = { localPos: tag.getImageCenter() };
|
|
|
- console.error(pos.value.localPos);
|
|
|
+ pos.value = { localPos: tag.getImageCenter(), modelId: props.scenePos.modelId };
|
|
|
};
|
|
|
changePos();
|
|
|
|
|
@@ -184,6 +181,12 @@ const iconClickHandler = () => {
|
|
|
custom.showTaggingPositions.add(props.scenePos);
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+console.log("create");
|
|
|
+onUnmounted(() => {
|
|
|
+ console.log("destory");
|
|
|
+ tag.destory();
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|