build-dxf 0.0.21 → 0.0.23

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/src/index2.js CHANGED
@@ -3,7 +3,7 @@ import * as d from "three";
3
3
  import { Group as q } from "three";
4
4
  import "clipper-lib";
5
5
  import "dxf-writer";
6
- import { E as w, R as E, L as Q, D as S, a as A, b as G, S as O } from "./selectLocalFile.js";
6
+ import { E as w, R as E, L as Q, D as O, a as S, b as G, S as A } from "./selectLocalFile.js";
7
7
  import { defineComponent as K, createElementBlock as R, openBlock as k, createElementVNode as y, toDisplayString as X, createVNode as x, unref as m, withCtx as D, createTextVNode as M, createApp as Y, ref as L, watch as C, onMounted as ee, onUnmounted as te, createCommentVNode as ie, createStaticVNode as ne } from "vue";
8
8
  function oe(p, e, i, t = "#fff", n = 2) {
9
9
  const o = document.createElement("canvas"), a = o.getContext("2d");
@@ -276,13 +276,13 @@ class F extends P {
276
276
  this.keyList.delete(t.value), this.dispatchEvent({ type: "codeChange", code: t.value, mode: "up" });
277
277
  }), i.addEventListener("focus", () => {
278
278
  this.keyList.clear(), this.mouseList.clear();
279
- }), this.addEventListener("codeChange", this._computedkeyCombination.bind(this)), this.addKeyCombination("save", ["control", "s"]), this.addCancelDefaultBehavior((t) => t.isOnlyKeyDowns(["control", "s"]));
279
+ }), this.addEventListener("codeChange", this._computedkeyCombination.bind(this)), this.addKeyCombination("save", ["control", "s"]), this.addCancelDefaultBehavior((t) => t.isOnlyKeyDowns(["control", "s"]) || t.isOnlyKeyDown("alt"));
280
280
  }
281
281
  /** 添加取消浏览器默认行为规则
282
282
  * @param callBack
283
283
  */
284
284
  addCancelDefaultBehavior(e) {
285
- (this.parent?.findComponentByType(S)).addCancelDefaultBehavior(() => e(this));
285
+ (this.parent?.findComponentByType(O)).addCancelDefaultBehavior(() => e(this));
286
286
  }
287
287
  /**
288
288
  * 计算组合按键
@@ -363,8 +363,8 @@ class F extends P {
363
363
  const Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
364
364
  __proto__: null,
365
365
  DetailsPointRender: I,
366
- DomContainer: A,
367
- DomEventRegister: S,
366
+ DomContainer: S,
367
+ DomEventRegister: O,
368
368
  EventInput: F,
369
369
  ModelDataRender: z,
370
370
  OriginalLineRender: j,
@@ -377,7 +377,7 @@ const Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
377
377
  },
378
378
  setup(p) {
379
379
  d.Object3D.DEFAULT_UP = new d.Vector3(0, 0, 1);
380
- const e = p, i = L(), t = L(!0), n = L(!0), o = L(!0), a = L(!1), s = new W().usePlugin(Z).usePlugin(fe), c = s.findComponentByType(J), u = s.findComponentByType(A), b = s.findComponentByType(H);
380
+ const e = p, i = L(), t = L(!0), n = L(!0), o = L(!0), a = L(!1), s = new W().usePlugin(Z).usePlugin(fe), c = s.findComponentByType(J), u = s.findComponentByType(S), b = s.findComponentByType(H);
381
381
  C(() => e.lines, () => e.lines && h(e.lines)), C(() => e.detailsPoint, () => e.detailsPoint && c?.set(e.detailsPoint));
382
382
  function h(r) {
383
383
  if (r) {
@@ -390,11 +390,11 @@ const Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
390
390
  }
391
391
  }
392
392
  async function f() {
393
- const r = await O.json();
393
+ const r = await A.json();
394
394
  Array.isArray(r) && (localStorage.removeItem("orbitControls"), h(r));
395
395
  }
396
396
  async function B() {
397
- const r = await O.json();
397
+ const r = await A.json();
398
398
  Array.isArray(r) && c?.set(r);
399
399
  }
400
400
  C(t, () => s.Variable.set("originalLineVisible", t.value)), C(n, () => s.Variable.set("dxfVisible", n.value)), C(o, () => s.Variable.set("whiteModelVisible", o.value)), s.Variable.addEventListener("isLook", (r) => a.value = r.value), s.Variable.addEventListener("originalLineVisible", (r) => t.value = r.value), s.Variable.addEventListener("dxfVisible", (r) => n.value = r.value), s.Variable.addEventListener("whiteModelVisible", (r) => o.value = r.value), localStorage.getItem("lines") ? h(JSON.parse(localStorage.getItem("lines") ?? "{}")) : h(e.lines), e.detailsPoint && c?.set(e.detailsPoint), ee(() => u && i.value?.appendChild(u.domElement)), te(() => s.destroy());
@@ -500,7 +500,7 @@ function T(p, e = {}) {
500
500
  detailsPoint: n = !0,
501
501
  orbitControls: o = !0,
502
502
  camera: a = new d.PerspectiveCamera(45, 1, 0.01, 1e3)
503
- } = e, s = new A();
503
+ } = e, s = new S();
504
504
  p.addComponent(s), p.addComponent(new E({
505
505
  canvas: s.canvas,
506
506
  camera: a,
@@ -514,7 +514,7 @@ function T(p, e = {}) {
514
514
  enableDamping: !0,
515
515
  dampingFactor: 0.15
516
516
  } : void 0
517
- })), i && p.addComponent(new j()), t && p.addComponent(new z()), n && p.addComponent(new I()), p.addComponent(new S()), p.addComponent(new F());
517
+ })), i && p.addComponent(new j()), t && p.addComponent(new z()), n && p.addComponent(new I()), p.addComponent(new O()), p.addComponent(new F());
518
518
  }
519
519
  const fe = Object.assign(T, {
520
520
  create(p = {}) {