Browse Source

修改标绘物UI点击时的操作: 改为中键点击时才会发生聚焦,避免左键拖拽时产生误操作

beijing
刘向辉 2 years ago
parent
commit
e85ebaf473
  1. 7
      src/app/babylon/model/info/mark/model-info-mark.ts

7
src/app/babylon/model/info/mark/model-info-mark.ts

@ -145,9 +145,12 @@ export class ModelInfo_mark extends ModelInfo {
this.uiFollowHead.thickness = 0;
this.uiFollowHead.adaptWidthToChildren = true;
this.uiFollowHead.linkWithMesh(this.headMesh);
this.uiFollowHead.onPointerClickObservable.add(() => {
this.uiFollowHead.onPointerClickObservable.add((info: Vector2WithInfo) => {
MarkWindow.instance.selectMarkDataFrom3d(instance, true);
instance.lookAt();
//中间点击时才发生聚焦
if (info.buttonIndex == 1) {
instance.lookAt();
}
});
this.uiFollowHeadBg = new Rectangle('bg');

Loading…
Cancel
Save