build-dxf 0.1.41 → 0.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.css +0 -4
- package/src/index3.js +16 -11
package/package.json
CHANGED
package/src/index.css
CHANGED
package/src/index3.js
CHANGED
|
@@ -10863,7 +10863,7 @@ class CommandFlowComponent extends Component {
|
|
|
10863
10863
|
}
|
|
10864
10864
|
function View() {
|
|
10865
10865
|
return createVNode("div", {
|
|
10866
|
-
"class": " z-20
|
|
10866
|
+
"class": " z-20 absolute left-0 top-0 w-[100%] h-[100%] flex flex-col",
|
|
10867
10867
|
"onClick": (e) => e.stopPropagation(),
|
|
10868
10868
|
"onPointerdown": (e) => e.stopPropagation()
|
|
10869
10869
|
}, [createVNode("div", {
|
|
@@ -10921,7 +10921,7 @@ class CommandFlowComponent extends Component {
|
|
|
10921
10921
|
}
|
|
10922
10922
|
function View() {
|
|
10923
10923
|
return createVNode("div", {
|
|
10924
|
-
"class": " pointer-events-none z-[18]
|
|
10924
|
+
"class": " pointer-events-none z-[18] absolute left-0 top-0 w-[100%] h-[100%] flex flex-col",
|
|
10925
10925
|
"onClick": (e) => e.stopPropagation(),
|
|
10926
10926
|
"onPointerdown": (e) => e.stopPropagation()
|
|
10927
10927
|
}, [createVNode("div", {
|
|
@@ -10941,13 +10941,17 @@ class CommandFlowComponent extends Component {
|
|
|
10941
10941
|
}
|
|
10942
10942
|
function updateData() {
|
|
10943
10943
|
const helpLine1 = new LineSegment(point, line2.start);
|
|
10944
|
-
|
|
10944
|
+
const len1 = helpLine1.length();
|
|
10945
|
+
text1.setText(mToMm(len1) + "mm");
|
|
10945
10946
|
let center = helpLine1.center;
|
|
10946
10947
|
text1.position.set(center.x, center.y, 0);
|
|
10948
|
+
num1Text.visible = len1 > 1e-9;
|
|
10947
10949
|
const helpLine2 = new LineSegment(point, line2.end);
|
|
10948
|
-
|
|
10950
|
+
const len2 = helpLine2.length();
|
|
10951
|
+
text2.setText(mToMm(len2) + "mm");
|
|
10949
10952
|
center = helpLine2.center;
|
|
10950
10953
|
text2.position.set(center.x, center.y, 0);
|
|
10954
|
+
num2Text.visible = len2 > 1e-9;
|
|
10951
10955
|
pointMesh.position.set(point.x, point.y, 0.05);
|
|
10952
10956
|
}
|
|
10953
10957
|
const group = new THREE.Group();
|
|
@@ -10959,15 +10963,15 @@ class CommandFlowComponent extends Component {
|
|
|
10959
10963
|
textAlign: "center",
|
|
10960
10964
|
borderRadius: "100px"
|
|
10961
10965
|
};
|
|
10962
|
-
context.renderer.createText("1", line2.start, style, group);
|
|
10963
|
-
context.renderer.createText("2", line2.end, style, group);
|
|
10966
|
+
const num1Text = context.renderer.createText("1", line2.start, style, group);
|
|
10967
|
+
const num2Text = context.renderer.createText("2", line2.end, style, group);
|
|
10964
10968
|
const pointMesh = context.renderer.createCircle(Point.zero(), {
|
|
10965
10969
|
color: 65280
|
|
10966
10970
|
}, group);
|
|
10967
10971
|
const text1 = context.createEditButton({
|
|
10968
10972
|
parent: group,
|
|
10969
10973
|
onClick: async () => {
|
|
10970
|
-
let width =
|
|
10974
|
+
let width = mToMm(point.distance(line2.start));
|
|
10971
10975
|
const {
|
|
10972
10976
|
promise: promise2,
|
|
10973
10977
|
close: close2
|
|
@@ -10979,7 +10983,7 @@ class CommandFlowComponent extends Component {
|
|
|
10979
10983
|
});
|
|
10980
10984
|
this.addEventRecord(uuid_, close2);
|
|
10981
10985
|
width = await promise2;
|
|
10982
|
-
const direct =
|
|
10986
|
+
const direct = line2.end.direction(line2.start);
|
|
10983
10987
|
point.copy(line2.start).add(direct.multiplyScalar(width / 1e3));
|
|
10984
10988
|
updateData();
|
|
10985
10989
|
}
|
|
@@ -10987,7 +10991,7 @@ class CommandFlowComponent extends Component {
|
|
|
10987
10991
|
const text2 = context.createEditButton({
|
|
10988
10992
|
parent: group,
|
|
10989
10993
|
onClick: async () => {
|
|
10990
|
-
let width =
|
|
10994
|
+
let width = mToMm(point.distance(line2.end));
|
|
10991
10995
|
const {
|
|
10992
10996
|
promise: promise2,
|
|
10993
10997
|
close: close2
|
|
@@ -10999,7 +11003,7 @@ class CommandFlowComponent extends Component {
|
|
|
10999
11003
|
});
|
|
11000
11004
|
this.addEventRecord(uuid_, close2);
|
|
11001
11005
|
width = await promise2;
|
|
11002
|
-
const direct =
|
|
11006
|
+
const direct = line2.start.direction(line2.end);
|
|
11003
11007
|
point.copy(line2.end).add(direct.multiplyScalar(width / 1e3));
|
|
11004
11008
|
updateData();
|
|
11005
11009
|
}
|
|
@@ -11246,7 +11250,7 @@ class Default extends CommandFlowComponent {
|
|
|
11246
11250
|
if (lines.length) this.container.add(this.selectLineObject3D);
|
|
11247
11251
|
else this.selectLineObject3D.removeFromParent();
|
|
11248
11252
|
const editor = this.editor;
|
|
11249
|
-
const position = lines.flatMap((line2) => line2.expandToRectangle(0.04, "bothSides").createGeometry());
|
|
11253
|
+
const position = lines.flatMap((line2) => line2.expandToRectangle(isMobileRef.value ? 0.12 : 0.04, "bothSides").createGeometry());
|
|
11250
11254
|
this.selectLineObject3D.geometry = editor.renderManager.createGeometry({
|
|
11251
11255
|
position
|
|
11252
11256
|
}, position.length / 3);
|
|
@@ -14778,6 +14782,7 @@ class PointDrag extends CommandFlowComponent {
|
|
|
14778
14782
|
if (JSON.stringify(data.list[0].new) === JSON.stringify(data.list[0].old)) this.commandFlow.writeOperationRecord = false;
|
|
14779
14783
|
}
|
|
14780
14784
|
next(data);
|
|
14785
|
+
queueMicrotask(() => this.commandFlow.writeOperationRecord = true);
|
|
14781
14786
|
}
|
|
14782
14787
|
/** 执行完成
|
|
14783
14788
|
*/
|