|
@@ -84,7 +84,6 @@ const tag = sdk.createTagging({
|
|
|
});
|
|
|
|
|
|
const changePos = () => {
|
|
|
- console.error("getImageCenter", tag.getImageCenter());
|
|
|
pos.value = { localPos: tag.getImageCenter(), modelId: props.scenePos.modelId };
|
|
|
};
|
|
|
|
|
@@ -92,10 +91,12 @@ watch(taggingStyle, (icon) => icon && tag.changeImage(getFileUrl(icon.icon)));
|
|
|
watchEffect(() => {
|
|
|
tag.changeCanMove(router.currentRoute.value.name === RoutesName.tagging);
|
|
|
});
|
|
|
-// watchEffect(() => tag.changeMat(props.scenePos.mat));
|
|
|
-// watchEffect(() => tag.changeFontSize(props.scenePos.fontSize));
|
|
|
-// watchEffect(() => tag.changeLineHeight(props.scenePos.lineHeight));
|
|
|
-watchEffect(() => tag.changeAltitudeAboveGround(props.scenePos.altitudeAboveGround));
|
|
|
+watchEffect(() => tag.changeMat(props.scenePos.mat));
|
|
|
+watchEffect(() => tag.changeFontSize(props.scenePos.fontSize));
|
|
|
+watchEffect(() => {
|
|
|
+ tag.changeLineHeight(props.scenePos.lineHeight);
|
|
|
+ changePos();
|
|
|
+});
|
|
|
watchEffect(() => tag.changeTitle(props.tagging.title));
|
|
|
watchEffect(() => tag.visibilityTitle(props.tagging.show3dTitle));
|
|
|
watchEffect(() => {
|
|
@@ -103,10 +104,10 @@ watchEffect(() => {
|
|
|
changePos();
|
|
|
});
|
|
|
|
|
|
-const [toCameraDistance] = useCameraChange(
|
|
|
- () => tag.getCameraDisSquared && tag.getCameraDisSquared()
|
|
|
-);
|
|
|
-const maxDisSqua = Math.sqrt(30);
|
|
|
+const [toCameraDistance] = useCameraChange(() => {
|
|
|
+ return tag.getCameraDisSquared && tag.getCameraDisSquared();
|
|
|
+});
|
|
|
+const maxDisSqua = Math.pow(30, 2);
|
|
|
const show = computed(
|
|
|
() => props.scenePos.globalVisibility || toCameraDistance.value <= maxDisSqua
|
|
|
);
|