|
@@ -55651,7 +55651,10 @@
|
|
}
|
|
}
|
|
}));
|
|
}));
|
|
[this.line, this.spot].forEach(e => e.addEventListener('drag', e => {
|
|
[this.line, this.spot].forEach(e => e.addEventListener('drag', e => {
|
|
- this.dragEnable && cursor.grabbing && this.changePos(e);
|
|
|
|
|
|
+ if (this.dragEnable && cursor.grabbing) {
|
|
|
|
+ var info = viewer.tagTool.getPoseByIntersect(e);
|
|
|
|
+ info && this.changePos(info);
|
|
|
|
+ }
|
|
}));
|
|
}));
|
|
[this.line, this.spot].forEach(e => e.addEventListener('startDragging', e => {
|
|
[this.line, this.spot].forEach(e => e.addEventListener('startDragging', e => {
|
|
this.dragEnable && viewer.inputHandler.intersect && setCursor('grabbing', 'add');
|
|
this.dragEnable && viewer.inputHandler.intersect && setCursor('grabbing', 'add');
|
|
@@ -55712,14 +55715,14 @@
|
|
this.lineLength = len;
|
|
this.lineLength = len;
|
|
this.updatePose();
|
|
this.updatePose();
|
|
}
|
|
}
|
|
- changePos(e) {
|
|
|
|
- var info = viewer.tagTool.getPoseByIntersect(e);
|
|
|
|
- if (!info) return;
|
|
|
|
|
|
+ changePos(info) {
|
|
this.position.copy(info.position);
|
|
this.position.copy(info.position);
|
|
this.normal.copy(info.normal);
|
|
this.normal.copy(info.normal);
|
|
|
|
+ this.root = info.root;
|
|
this.setNorQua();
|
|
this.setNorQua();
|
|
this.updatePose();
|
|
this.updatePose();
|
|
this.dispatchEvent('posChanged');
|
|
this.dispatchEvent('posChanged');
|
|
|
|
+ viewer.dispatchEvent('content_changed');
|
|
}
|
|
}
|
|
changeOnMesh(onMesh) {
|
|
changeOnMesh(onMesh) {
|
|
//是否贴在mesh上
|
|
//是否贴在mesh上
|