build-dxf 0.1.26 → 0.1.27
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
CHANGED
package/src/index.css
CHANGED
|
@@ -738,13 +738,11 @@
|
|
|
738
738
|
-webkit-tap-highlight-color: transparent;
|
|
739
739
|
}
|
|
740
740
|
|
|
741
|
-
[data-v-
|
|
742
|
-
font-family: 微软雅黑;
|
|
743
|
-
/* font-size: 14px; */
|
|
741
|
+
[data-v-88eae165] {
|
|
742
|
+
font-family: 微软雅黑;
|
|
744
743
|
}
|
|
745
|
-
.number[data-v-
|
|
746
|
-
color: #a7a7a7
|
|
747
|
-
/* font-weight: 600; */
|
|
744
|
+
.number[data-v-88eae165] {
|
|
745
|
+
color: #a7a7a7
|
|
748
746
|
}
|
|
749
747
|
|
|
750
748
|
[data-v-a41b5baa] {
|
package/src/index3.js
CHANGED
|
@@ -11966,18 +11966,19 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11966
11966
|
function dragMoveHelper(e) {
|
|
11967
11967
|
if (isMobile() && e instanceof MouseEvent) return;
|
|
11968
11968
|
let offsetX = 0, offsetY = 0;
|
|
11969
|
+
isdrag.value = true;
|
|
11969
11970
|
if (e instanceof MouseEvent) {
|
|
11970
11971
|
offsetX = e.offsetX;
|
|
11971
11972
|
offsetY = e.offsetY;
|
|
11972
11973
|
} else if (e instanceof TouchEvent) {
|
|
11973
|
-
const
|
|
11974
|
-
offsetX = touch.pageX -
|
|
11975
|
-
offsetY = touch.pageY -
|
|
11974
|
+
const rect2 = e.target.getBoundingClientRect(), touch = e.touches[0];
|
|
11975
|
+
offsetX = touch.pageX - rect2.left;
|
|
11976
|
+
offsetY = touch.pageY - rect2.top;
|
|
11976
11977
|
}
|
|
11977
11978
|
const cusor = document.body.style.cursor;
|
|
11978
11979
|
document.body.style.cursor = "move";
|
|
11980
|
+
const rect = elRef.value.getBoundingClientRect(), toolBarRect = toolBarRef.value.getBoundingClientRect();
|
|
11979
11981
|
const move = (e2) => {
|
|
11980
|
-
const rect = elRef.value.getBoundingClientRect(), toolBarRect = toolBarRef.value.getBoundingClientRect();
|
|
11981
11982
|
setEditorToolPosition(
|
|
11982
11983
|
e2.pageX - rect.left - offsetX,
|
|
11983
11984
|
e2.pageY - rect.top - offsetY,
|
|
@@ -11985,16 +11986,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11985
11986
|
toolBarRect
|
|
11986
11987
|
);
|
|
11987
11988
|
e2.stopPropagation();
|
|
11989
|
+
e2.preventDefault();
|
|
11988
11990
|
document.body.style.cursor = "move";
|
|
11989
11991
|
};
|
|
11990
11992
|
const end = () => {
|
|
11991
|
-
document.
|
|
11993
|
+
document.removeEventListener("mousemove", move);
|
|
11992
11994
|
document.removeEventListener("mouseup", end);
|
|
11993
11995
|
document.body.style.cursor = cusor;
|
|
11996
|
+
isdrag.value = false;
|
|
11994
11997
|
};
|
|
11995
11998
|
const touchmove = (e2) => {
|
|
11996
11999
|
if (e2.touches.length) {
|
|
11997
|
-
const
|
|
12000
|
+
const touch = e2.touches[0];
|
|
11998
12001
|
setEditorToolPosition(
|
|
11999
12002
|
touch.pageX - rect.left - offsetX,
|
|
12000
12003
|
touch.pageY - rect.top - offsetY,
|
|
@@ -12008,18 +12011,20 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12008
12011
|
}
|
|
12009
12012
|
};
|
|
12010
12013
|
const touchend = () => {
|
|
12011
|
-
document.
|
|
12012
|
-
document.
|
|
12014
|
+
document.removeEventListener("touchmove", touchmove);
|
|
12015
|
+
document.removeEventListener("touchend", touchend);
|
|
12013
12016
|
document.body.style.cursor = cusor;
|
|
12017
|
+
isdrag.value = false;
|
|
12014
12018
|
};
|
|
12015
12019
|
if (isMobile()) {
|
|
12016
|
-
document.
|
|
12020
|
+
document.addEventListener("touchmove", touchmove, { passive: false });
|
|
12017
12021
|
document.addEventListener("touchend", touchend);
|
|
12018
12022
|
} else {
|
|
12019
|
-
document.
|
|
12023
|
+
document.addEventListener("mousemove", move);
|
|
12020
12024
|
document.addEventListener("mouseup", end);
|
|
12021
12025
|
}
|
|
12022
12026
|
e.stopPropagation();
|
|
12027
|
+
e.preventDefault();
|
|
12023
12028
|
}
|
|
12024
12029
|
function onClickIcon() {
|
|
12025
12030
|
emits("clickIcon");
|
|
@@ -12027,7 +12032,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12027
12032
|
const props = __props;
|
|
12028
12033
|
const emits = __emit;
|
|
12029
12034
|
const showContent = useModel(__props, "showContent");
|
|
12030
|
-
const elRef = ref(), toolBarRef = ref(), toolBarPosition = ref({ left: props.position?.x ?? 10, top: props.position?.y ?? 100 }), resizeObserver = new ResizeObserver(() => setEditorToolPosition(toolBarPosition.value.left, toolBarPosition.value.top));
|
|
12035
|
+
const elRef = ref(), toolBarRef = ref(), toolBarPosition = ref({ left: props.position?.x ?? 10, top: props.position?.y ?? 100 }), resizeObserver = new ResizeObserver(() => setEditorToolPosition(toolBarPosition.value.left, toolBarPosition.value.top)), isdrag = ref(false);
|
|
12031
12036
|
watch(showContent, () => {
|
|
12032
12037
|
if (showContent.value) {
|
|
12033
12038
|
nextTick(() => setEditorToolPosition(toolBarPosition.value.left, toolBarPosition.value.top));
|
|
@@ -12048,7 +12053,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12048
12053
|
return openBlock(), createElementBlock("div", {
|
|
12049
12054
|
ref_key: "elRef",
|
|
12050
12055
|
ref: elRef,
|
|
12051
|
-
class: "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[20] flex flex-row justify-between p-[5px] box-border select-none pointer-events-[all]"
|
|
12056
|
+
class: normalizeClass([{ "pointer-events-none": isdrag.value }, "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[20] flex flex-row justify-between p-[5px] box-border select-none pointer-events-[all]"])
|
|
12052
12057
|
}, [
|
|
12053
12058
|
createElementVNode("div", {
|
|
12054
12059
|
ref_key: "toolBarRef",
|
|
@@ -12088,7 +12093,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12088
12093
|
renderSlot(_ctx.$slots, "default")
|
|
12089
12094
|
])) : createCommentVNode("", true)
|
|
12090
12095
|
], 38)
|
|
12091
|
-
],
|
|
12096
|
+
], 2);
|
|
12092
12097
|
};
|
|
12093
12098
|
}
|
|
12094
12099
|
});
|
|
@@ -12181,7 +12186,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12181
12186
|
props: {
|
|
12182
12187
|
selectLines: {}
|
|
12183
12188
|
},
|
|
12184
|
-
emits: ["update"],
|
|
12189
|
+
emits: ["update", "clickIcon"],
|
|
12185
12190
|
setup(__props, { emit: __emit }) {
|
|
12186
12191
|
const props = __props, emits = __emit, selectLines = props.selectLines, map = /* @__PURE__ */ new Map(), userDataList = computed(() => {
|
|
12187
12192
|
return selectLines.value.map((line2) => {
|
|
@@ -12194,7 +12199,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12194
12199
|
return openBlock(), createBlock(_sfc_main$3, {
|
|
12195
12200
|
title: "属性",
|
|
12196
12201
|
name: "PropertiesPanel",
|
|
12197
|
-
style: { "z-index": "201" }
|
|
12202
|
+
style: { "z-index": "201" },
|
|
12203
|
+
onClickIcon: _cache[5] || (_cache[5] = ($event) => emits("clickIcon"))
|
|
12198
12204
|
}, {
|
|
12199
12205
|
default: withCtx(() => [
|
|
12200
12206
|
createElementVNode("div", {
|
|
@@ -12216,18 +12222,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12216
12222
|
return openBlock(), createElementBlock("p", _hoisted_8$1, [
|
|
12217
12223
|
createElementVNode("span", _hoisted_9$1, toDisplayString(index2 === 0 ? "开始" : "结束"), 1),
|
|
12218
12224
|
createElementVNode("span", _hoisted_10$1, "x:" + toDisplayString(point.x.toFixed(2)), 1),
|
|
12219
|
-
_cache[
|
|
12225
|
+
_cache[6] || (_cache[6] = createElementVNode("span", { class: "mr-[20px]" }, null, -1)),
|
|
12220
12226
|
createElementVNode("span", _hoisted_11$1, "y:" + toDisplayString(point.y.toFixed(2)), 1)
|
|
12221
12227
|
]);
|
|
12222
12228
|
}), 256)),
|
|
12223
12229
|
createElementVNode("p", _hoisted_12$1, [
|
|
12224
|
-
_cache[
|
|
12230
|
+
_cache[7] || (_cache[7] = createElementVNode("span", { class: "mr-[5px]" }, "长度", -1)),
|
|
12225
12231
|
createElementVNode("span", _hoisted_13$1, toDisplayString(Number(line2.length().toFixed(4))) + "m", 1)
|
|
12226
12232
|
])
|
|
12227
12233
|
]),
|
|
12228
12234
|
createElementVNode("div", _hoisted_14$1, [
|
|
12229
12235
|
userDataList.value[i].isSelectWindow ? (openBlock(), createElementBlock("p", _hoisted_15$1, [
|
|
12230
|
-
_cache[
|
|
12236
|
+
_cache[8] || (_cache[8] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "窗户宽度", -1)),
|
|
12231
12237
|
createVNode(_sfc_main$2, {
|
|
12232
12238
|
onBlur: _cache[0] || (_cache[0] = ($event) => emits("update")),
|
|
12233
12239
|
modelValue: userDataList.value[i].width,
|
|
@@ -12246,7 +12252,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12246
12252
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
12247
12253
|
]),
|
|
12248
12254
|
line2.userData.isDoor ? (openBlock(), createElementBlock("p", _hoisted_18, [
|
|
12249
|
-
_cache[
|
|
12255
|
+
_cache[9] || (_cache[9] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "门高度", -1)),
|
|
12250
12256
|
createVNode(_sfc_main$2, {
|
|
12251
12257
|
onBlur: _cache[2] || (_cache[2] = ($event) => emits("update")),
|
|
12252
12258
|
modelValue: userDataList.value[i].drawDoorData.height,
|
|
@@ -12255,7 +12261,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12255
12261
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
12256
12262
|
])) : createCommentVNode("", true),
|
|
12257
12263
|
userDataList.value[i].isSelectWindow ? (openBlock(), createElementBlock("p", _hoisted_19, [
|
|
12258
|
-
_cache[
|
|
12264
|
+
_cache[10] || (_cache[10] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "离地高度", -1)),
|
|
12259
12265
|
createVNode(_sfc_main$2, {
|
|
12260
12266
|
onBlur: _cache[3] || (_cache[3] = ($event) => emits("update")),
|
|
12261
12267
|
modelValue: userDataList.value[i].groundClearance,
|
|
@@ -12283,7 +12289,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
12283
12289
|
}
|
|
12284
12290
|
return target;
|
|
12285
12291
|
};
|
|
12286
|
-
const PropertiesPanelView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
12292
|
+
const PropertiesPanelView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-88eae165"]]);
|
|
12287
12293
|
class PropertiesPanel extends CommandFlowComponent {
|
|
12288
12294
|
static name = "PropertiesPanel";
|
|
12289
12295
|
container = new THREE.Group();
|
|
@@ -12334,7 +12340,7 @@ class PropertiesPanel extends CommandFlowComponent {
|
|
|
12334
12340
|
this.isOpen = true;
|
|
12335
12341
|
const container = document.createElement("div");
|
|
12336
12342
|
container.tabIndex = 1;
|
|
12337
|
-
["
|
|
12343
|
+
["mousedown", "keydown", "keyup"].forEach((key) => container.addEventListener(key, (e) => e.stopPropagation()));
|
|
12338
12344
|
this.domElement.appendChild(container);
|
|
12339
12345
|
const selectLines = ref([]);
|
|
12340
12346
|
const update = () => {
|
|
@@ -12366,7 +12372,7 @@ class PropertiesPanel extends CommandFlowComponent {
|
|
|
12366
12372
|
position: this.editor.domEventRegister.pointer.clone(),
|
|
12367
12373
|
onClickIcon: () => {
|
|
12368
12374
|
eventCloses.forEach((eventClose) => eventClose());
|
|
12369
|
-
|
|
12375
|
+
container.remove();
|
|
12370
12376
|
this.container.clear();
|
|
12371
12377
|
this.isOpen = false;
|
|
12372
12378
|
},
|
|
@@ -13269,6 +13275,7 @@ class RayDistance extends CommandFlowComponent {
|
|
|
13269
13275
|
super.onAddFromParent(parent);
|
|
13270
13276
|
this.editor.container.add(this.container);
|
|
13271
13277
|
const commandFlow = this.commandManager.addCommandFlow(this.commandName).add(this.createInterrupt()).add(this.createCursor("no-drop")).add(this.selectPoint.bind(this), { prompt: `请选择线段上的一个点作为发射点, ${this.formatText("ESC")} 取消命令` }).add(this.ray.bind(this), { prompt: `按 ${this.formatText("Enter")} 重新选择发射点, ${this.formatText("ESC")} 取消命令` }).setLoop(true);
|
|
13278
|
+
commandFlow.writeOperationList = false;
|
|
13272
13279
|
commandFlow.addEventListener("finally", this.createFinally());
|
|
13273
13280
|
this.eventInput.addKeyCombination(this.commandName, this.shortcutKeys);
|
|
13274
13281
|
this.eventInput.addEventListener("codeChange", async () => this.eventInput.isKeyCombination(this.commandName) && await this.commandManager.start(this.commandName));
|
|
@@ -13349,6 +13356,7 @@ class ManualDistance extends CommandFlowComponent {
|
|
|
13349
13356
|
super.onAddFromParent(parent);
|
|
13350
13357
|
this.editor.container.add(this.container);
|
|
13351
13358
|
const commandFlow = this.commandManager.addCommandFlow(this.commandName).add(this.createInterrupt()).add(this.createCursor("no-drop")).add(this.selectPoint.bind(this), { prompt: `请选择两个点, ${this.formatText("ESC")} 取消命令` }).add(this.ray.bind(this), { prompt: `按 ${this.formatText("Enter")} 重新选择, ${this.formatText("ESC")} 取消命令` }).setLoop(true);
|
|
13359
|
+
commandFlow.writeOperationList = false;
|
|
13352
13360
|
commandFlow.addEventListener("finally", this.createFinally());
|
|
13353
13361
|
this.eventInput.addKeyCombination(this.commandName, this.shortcutKeys);
|
|
13354
13362
|
this.eventInput.addEventListener("codeChange", async () => this.eventInput.isKeyCombination(this.commandName) && await this.commandManager.start(this.commandName));
|
|
@@ -10,7 +10,9 @@ type __VLS_Props = {
|
|
|
10
10
|
};
|
|
11
11
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
12
|
update: (...args: any[]) => void;
|
|
13
|
+
clickIcon: (...args: any[]) => void;
|
|
13
14
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
15
|
onUpdate?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onClickIcon?: ((...args: any[]) => any) | undefined;
|
|
15
17
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
18
|
export default _default;
|