build-dxf 0.0.19-7 → 0.0.19-8
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/build.d.ts +20 -0
- package/src/build.js +24 -3
- package/src/index.css +655 -1
- package/src/index.js +4 -2
- package/src/index2.js +2 -0
- package/src/index3.js +21 -10
- package/src/utils/ComponentManager/ComponentManager.d.ts +1 -1
package/src/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { D, M, i, c } from "./build.js";
|
|
2
1
|
import "three";
|
|
2
|
+
import { D, M, i, c, g, d } from "./build.js";
|
|
3
3
|
export {
|
|
4
4
|
D as DxfSystem,
|
|
5
5
|
M as ModelDataPlugin,
|
|
6
6
|
i as components,
|
|
7
|
-
c as createEditor
|
|
7
|
+
c as createEditor,
|
|
8
|
+
g as getFileAll,
|
|
9
|
+
d as getGlobalDxfSystem
|
|
8
10
|
};
|
package/src/index2.js
CHANGED
|
@@ -822,6 +822,8 @@ class EventInput extends Component {
|
|
|
822
822
|
this.mouseList.clear();
|
|
823
823
|
});
|
|
824
824
|
this.addEventListener("codeChange", this._computedkeyCombination.bind(this));
|
|
825
|
+
this.addKeyCombination("save", ["control", "s"]);
|
|
826
|
+
this.addCancelDefaultBehavior((input) => input.isOnlyKeyDowns(["control", "s"]));
|
|
825
827
|
}
|
|
826
828
|
/** 添加取消浏览器默认行为规则
|
|
827
829
|
* @param callBack
|
package/src/index3.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
2
|
import { i as isString, n as noop, r as resolveUnref, t as tryOnScopeDispose, b as isClient, c as tryOnMounted, d as identity, e as buildProps, f as definePropType, _ as _export_sfc, u as useNamespace, g as isNumber, h as addUnit, w as withInstall, j as useEmptyValuesProps, k as useSizeProp, p as provideGlobalConfig, l as iconPropType, m as useGlobalComponentSettings, T as TypeComponentsMap, o as ElIcon, q as TypeComponents, s as useTimeoutFn, v as isString$1, x as isFunction, y as isBoolean, z as isElement, A as withInstallFunction, L as Lines, E as ElButton, a as ElCheckbox, S as SelectLocalFile } from "./selectLocalFile.js";
|
|
3
|
-
import { C as Component, L as LineSegment, P as Point, B as Box2, E as EventDispatcher, b as PointVirtualGrid, Q as Quadtree } from "./build.js";
|
|
3
|
+
import { C as Component, L as LineSegment, P as Point, B as Box2, E as EventDispatcher, g as getFileAll, b as PointVirtualGrid, Q as Quadtree } from "./build.js";
|
|
4
4
|
import { watch, ref, defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeStyle, createTextVNode, toDisplayString, vShow, shallowReactive, onMounted, createBlock, createCommentVNode, resolveDynamicComponent, Fragment, withModifiers, nextTick, isVNode, render, toRaw, createStaticVNode, createApp } from "vue";
|
|
5
5
|
import "clipper-lib";
|
|
6
6
|
import "dxf-writer";
|
|
@@ -1097,11 +1097,11 @@ class Default extends Component {
|
|
|
1097
1097
|
const rectangle = line.expandToRectangle(0.02, "bothSides");
|
|
1098
1098
|
object3D.geometry = editor.renderManager.createGeometry({ position: rectangle.createGeometry() }, 6);
|
|
1099
1099
|
this.container.add(object3D);
|
|
1100
|
-
dom.
|
|
1100
|
+
dom.style.cursor = "pointer";
|
|
1101
1101
|
currentSelectLine = line;
|
|
1102
1102
|
} else {
|
|
1103
1103
|
object3D.removeFromParent();
|
|
1104
|
-
dom.
|
|
1104
|
+
dom.style.cursor = "default";
|
|
1105
1105
|
currentSelectLine = null;
|
|
1106
1106
|
}
|
|
1107
1107
|
}),
|
|
@@ -1259,7 +1259,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1259
1259
|
},
|
|
1260
1260
|
setup(__props) {
|
|
1261
1261
|
const props = __props;
|
|
1262
|
-
const originalLineVisible = ref(true), dxfVisible = ref(true), whiteModelVisible = ref(true), isLook = ref(false), dxfSystem = toRaw(props.dxfSystem);
|
|
1262
|
+
const originalLineVisible = ref(true), dxfVisible = ref(true), whiteModelVisible = ref(true), isLook = ref(false), dxfSystem = toRaw(props.dxfSystem), log = console.log;
|
|
1263
1263
|
function setLines(lines) {
|
|
1264
1264
|
if (lines) {
|
|
1265
1265
|
localStorage.setItem("lines", JSON.stringify(lines));
|
|
@@ -1293,33 +1293,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1293
1293
|
type: "success",
|
|
1294
1294
|
onClick: selectLocalFile
|
|
1295
1295
|
}, {
|
|
1296
|
-
default: withCtx(() => _cache[
|
|
1296
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
1297
1297
|
createTextVNode(" 选择文件 ", -1)
|
|
1298
1298
|
])),
|
|
1299
1299
|
_: 1,
|
|
1300
|
-
__: [
|
|
1300
|
+
__: [3]
|
|
1301
1301
|
}),
|
|
1302
1302
|
createVNode(unref(ElButton), {
|
|
1303
1303
|
size: "small",
|
|
1304
1304
|
type: "primary",
|
|
1305
1305
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(dxfSystem).Dxf.download("test.dxf"))
|
|
1306
1306
|
}, {
|
|
1307
|
-
default: withCtx(() => _cache[
|
|
1307
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
1308
1308
|
createTextVNode(" 下载 DXF ", -1)
|
|
1309
1309
|
])),
|
|
1310
1310
|
_: 1,
|
|
1311
|
-
__: [
|
|
1311
|
+
__: [4]
|
|
1312
|
+
}),
|
|
1313
|
+
createVNode(unref(ElButton), {
|
|
1314
|
+
size: "small",
|
|
1315
|
+
type: "primary",
|
|
1316
|
+
onClick: _cache[1] || (_cache[1] = ($event) => unref(log)(unref(getFileAll)()))
|
|
1317
|
+
}, {
|
|
1318
|
+
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
1319
|
+
createTextVNode(" 打印 ", -1)
|
|
1320
|
+
])),
|
|
1321
|
+
_: 1,
|
|
1322
|
+
__: [5]
|
|
1312
1323
|
})
|
|
1313
1324
|
]),
|
|
1314
1325
|
createElementVNode("div", _hoisted_3, [
|
|
1315
1326
|
createElementVNode("div", _hoisted_4, [
|
|
1316
1327
|
createVNode(unref(ElCheckbox), {
|
|
1317
1328
|
modelValue: dxfVisible.value,
|
|
1318
|
-
"onUpdate:modelValue": _cache[
|
|
1329
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dxfVisible.value = $event),
|
|
1319
1330
|
label: "dxf"
|
|
1320
1331
|
}, null, 8, ["modelValue"])
|
|
1321
1332
|
]),
|
|
1322
|
-
_cache[
|
|
1333
|
+
_cache[6] || (_cache[6] = createStaticVNode('<div class="mt-[5px] text-[#c9c9c9] text-[10px]"><p class="text-right"> 绘制连续线段:<span class="w-[110px] inline-block">Ctrl + L</span></p><p class="text-right"> 绘制线段确认:<span class="w-[110px] inline-block">Enter</span></p><p class="text-right"> 绘制门线:<span class="w-[110px] inline-block">Ctrl + M</span></p><p class="text-right"> 绘制窗户线:<span class="w-[110px] inline-block">Ctrl + Q</span></p><p class="text-right"> 移动线段点:<span class="w-[110px] inline-block">Ctrl + P</span></p><p class="text-right"> 删除线段:<span class="w-[110px] inline-block">选中 + Delete</span></p><p class="text-right"> 删除窗户线:<span class="w-[110px] inline-block">选中 + Q + Delete</span></p><p class="text-right"> 选中:<span class="w-[110px] inline-block">鼠标左键</span></p><p class="text-right"> 多选:<span class="w-[110px] inline-block">鼠标左键 + Ctrl</span></p><p class="text-right"> 取消选中:<span class="w-[110px] inline-block">鼠标左键 + Alt</span></p><p class="text-right"> 框选:<span class="w-[110px] inline-block">鼠标左键 + 移动</span></p><p class="text-right"> 线段同方向合并:<span class="w-[110px] inline-block">Ctrl + G</span></p><p class="text-right"> 线段连接:<span class="w-[110px] inline-block">选中 + Shift + L</span></p><p class="text-right"> 线段交点连接:<span class="w-[110px] inline-block">选中 + Ctrl + Shift + L</span></p><p class="text-right"> 取消命令:<span class="w-[110px] inline-block">Esc</span></p></div>', 1))
|
|
1323
1334
|
])
|
|
1324
1335
|
]);
|
|
1325
1336
|
};
|
|
@@ -32,7 +32,7 @@ export declare class ComponentManager<TEventMap extends {} = {}> extends EventDi
|
|
|
32
32
|
* 查找所有符合条件的组件
|
|
33
33
|
* @param callBack
|
|
34
34
|
*/
|
|
35
|
-
findComponents(predicate: (component: Component, index: number) => boolean): Component<{}>
|
|
35
|
+
findComponents(predicate: (component: Component, index: number) => boolean): Component<{}>[];
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @param type
|