bill пре 8 месеци
родитељ
комит
395e7e0645
3 измењених фајлова са 7 додато и 16 уклоњено
  1. 0 4
      src/api/tagging-position.ts
  2. 7 8
      src/components/tagging/sign-new.vue
  3. 0 4
      src/sdk/sdk.ts

+ 0 - 4
src/api/tagging-position.ts

@@ -19,7 +19,6 @@ interface ServicePosition {
   normal: string
   
   globalVisibility: boolean
-  altitudeAboveGround: number
   type: string,
   mat: string
   fontSize: number,
@@ -40,7 +39,6 @@ export interface TaggingPosition {
   lineHeight: number,
   globalVisibility: boolean
 
-  altitudeAboveGround: number
   type: TaggingPositionType
   mat: Tagging3DProps['mat']
 }
@@ -62,7 +60,6 @@ const serviceToLocal = (position: ServicePosition, taggingId?: Tagging['id']): T
   },
   fontSize: position.fontSize || 12,
   lineHeight: position.lineHeight || 1,
-  altitudeAboveGround: position.altitudeAboveGround
 })
 
 const localToService = (position: TaggingPosition, update = false): PartialProps<ServicePosition, 'tagPointId'> => ({
@@ -73,7 +70,6 @@ const localToService = (position: TaggingPosition, update = false): PartialProps
   globalVisibility: position.globalVisibility,
   type: position.type,
   mat: position.mat && JSON.stringify(position.mat),
-  altitudeAboveGround: position.altitudeAboveGround,
   normal: JSON.stringify(position.normal),
   fontSize: position.fontSize,
   lineHeight: position.lineHeight

+ 7 - 8
src/components/tagging/sign-new.vue

@@ -92,10 +92,9 @@ 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));
 watchEffect(() => tag.changeTitle(props.tagging.title));
 watchEffect(() => tag.visibilityTitle(props.tagging.show3dTitle));
 watchEffect(() => {
@@ -103,10 +102,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
 );

+ 0 - 4
src/sdk/sdk.ts

@@ -258,8 +258,6 @@ export type Tagging3DProps = {
   canMove: boolean,
   // 贴地图片url
   image: string
-  // 离地高度
-  altitudeAboveGround: number,
   
   // 贴地图片的变换
   mat: {
@@ -294,8 +292,6 @@ export type Tagging3D = {
   visibility: (visibility: boolean) => void
   // 标注图片变换,传入变换
   changeMat: (props: Tagging3DProps['mat']) => void
-  // 更改离地高度
-  changeAltitudeAboveGround: (val: number) => void
   // 更改热点类型
   changeType: (val: TaggingPositionType) => void
   // 距离相机位置