archgine 1.0.68 → 1.0.70

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.
@@ -4010,7 +4010,7 @@ Fu.__DOMHandler = Eu;
4010
4010
  Fu.normalizeLineEndings = Le;
4011
4011
  Fu.DOMParser = Ie;
4012
4012
  var gr = Fu.DOMParser;
4013
- const Er = "1.0.68";
4013
+ const Er = "1.0.70";
4014
4014
  function vr() {
4015
4015
  return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
4016
4016
  }
@@ -24,7 +24,7 @@ export interface IApp {
24
24
  setFillByIds(ids: string[], c: string): void;
25
25
  clearFill(): void;
26
26
  clearFillByIds(ids?: string[]): void;
27
- setStrokeByIds(ids: string[], c: string): void;
27
+ setStrokeByIds(ids: string[], c: string, sw?: string): void;
28
28
  clearStroke(): void;
29
29
  clearStrokeByIds(ids?: string[]): void;
30
30
  getLegend(): any[] | undefined;
@@ -51,6 +51,7 @@ export interface IApp {
51
51
  multiSelectEnableChanged(v: boolean): void;
52
52
  clearSelected(): void;
53
53
  socialDistanceEnableChanged(v: boolean): void;
54
+ fnEnableChanged(v?: boolean): void;
54
55
  getBoundingBoxById(id: string, viewTrans?: boolean): Box2 | undefined;
55
56
  setDummies(dummies: IDummyVo[]): void;
56
57
  clearDummies(): void;
@@ -28,6 +28,7 @@ export declare class SvgApp<Config extends ISvgAppConfig> extends EventDispatche
28
28
  zoomBox: Box2;
29
29
  selectEnable: boolean;
30
30
  multiSelectEnable: boolean;
31
+ fnEnable: boolean;
31
32
  requestHeader: any;
32
33
  private readonly runningHandler;
33
34
  private readonly pointerOverHandler;
@@ -67,7 +68,7 @@ export declare class SvgApp<Config extends ISvgAppConfig> extends EventDispatche
67
68
  setFillByIds(ids: string[], c: string): void;
68
69
  clearStroke(): void;
69
70
  clearStrokeByIds(ids?: string[]): void;
70
- setStrokeByIds(ids: string[], c: string): void;
71
+ setStrokeByIds(ids: string[], c: string, sw?: string): void;
71
72
  getLegend(): Array<TLegend> | undefined;
72
73
  setAssetLabels(id: string, labels?: string[]): void;
73
74
  clearAssetLabels(): void;
@@ -91,6 +92,7 @@ export declare class SvgApp<Config extends ISvgAppConfig> extends EventDispatche
91
92
  selectEnableChanged(v: boolean): void;
92
93
  multiSelectEnableChanged(v: boolean): void;
93
94
  socialDistanceEnableChanged(v: boolean): void;
95
+ fnEnableChanged(v?: boolean): void;
94
96
  getBoundingBoxById(id: string, viewTrans?: boolean): Box2 | undefined;
95
97
  setDummies(dummies: IDummyVo[]): void;
96
98
  clearDummies(aeTypes?: string[]): void;
@@ -14,6 +14,7 @@ export declare class SvgMultiSelector extends EventDispatcher {
14
14
  graph: DynamicDrawRect;
15
15
  selectEnable: boolean;
16
16
  multiSelectEnable: boolean;
17
+ fnEnable: boolean;
17
18
  controllerTapHandler: (e: IEvent) => void;
18
19
  controllerPanStartHandler: (e: IEvent) => void;
19
20
  controllerPanMoveHandler: (e: IEvent) => void;
@@ -23,6 +24,7 @@ export declare class SvgMultiSelector extends EventDispatcher {
23
24
  bindScene(scene: Scene): void;
24
25
  selectEnableChanged(v: boolean): void;
25
26
  multiSelectEnableChanged(v: boolean): void;
27
+ fnEnableChanged(v?: boolean): void;
26
28
  bindControllerEvents(): void;
27
29
  unbindControllerEvents(): void;
28
30
  handleControllerTap(e: IEvent): void;
@@ -30,6 +30,7 @@ export declare class SvgView<Config extends ISvgViewConfig> extends EventDispatc
30
30
  zoomBox: Box2;
31
31
  selectEnable: boolean;
32
32
  multiSelectEnable: boolean;
33
+ fnEnable: boolean;
33
34
  tween?: Tween;
34
35
  animateDuration: number;
35
36
  label?: Label;
@@ -54,6 +55,7 @@ export declare class SvgView<Config extends ISvgViewConfig> extends EventDispatc
54
55
  zoomToSelectEnableChanged(v: boolean): void;
55
56
  selectEnableChanged(v: boolean): void;
56
57
  multiSelectEnableChanged(v: boolean): void;
58
+ fnEnableChanged(v?: boolean): void;
57
59
  getIntersectObjects(rayCaster: IRaycaster, assetType?: string, out?: HTMLElement[]): HTMLElement[];
58
60
  focusAt(position: IVector2, padding?: number): Promise<void>;
59
61
  focusAtById(id: string, padding?: number): Promise<void>;
package/lib/index.mjs CHANGED
@@ -4010,7 +4010,7 @@ ou.__DOMHandler = Ra;
4010
4010
  ou.normalizeLineEndings = Cd;
4011
4011
  ou.DOMParser = Dd;
4012
4012
  var Yx = ou.DOMParser;
4013
- const Xx = "1.0.68";
4013
+ const Xx = "1.0.70";
4014
4014
  function Zx() {
4015
4015
  return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
4016
4016
  }
@@ -12238,13 +12238,13 @@ class Ah extends CE {
12238
12238
  t != null && t.length && !t.includes(a[l]) || (o = i[a[l]], !(!o || !o.hasAttribute(e)) && (o.removeAttribute(e), e === "stroke" && o.removeAttribute("stroke-width")));
12239
12239
  this.clearLegendBy(e);
12240
12240
  }
12241
- setFillOrStrokeByIds(t, e, i = "fill") {
12242
- const a = this.getAssetsByType(this.assetType);
12243
- if (!a) return;
12244
- const o = Nt.keys(a);
12245
- let l;
12246
- for (let c = 0, f = o.length; c < f; c++)
12247
- t.includes(o[c]) && (l = a[o[c]], l && (l.setAttribute(i, e), i === "stroke" && l.setAttribute("stroke-width", "7"), this.addLegend(i, e, o[c])));
12241
+ setFillOrStrokeByIds(t, e, i = "fill", a = "7") {
12242
+ const o = this.getAssetsByType(this.assetType);
12243
+ if (!o) return;
12244
+ const l = Nt.keys(o);
12245
+ let c;
12246
+ for (let f = 0, d = l.length; f < d; f++)
12247
+ t.includes(l[f]) && (c = o[l[f]], c && (c.setAttribute(i, e), i === "stroke" && c.setAttribute("stroke-width", a), this.addLegend(i, e, l[f])));
12248
12248
  }
12249
12249
  addLegend(t, e, i) {
12250
12250
  let a = this.legend.find((o) => o.color === e);
@@ -14066,6 +14066,7 @@ class DA extends rr {
14066
14066
  graph;
14067
14067
  selectEnable = !1;
14068
14068
  multiSelectEnable = !1;
14069
+ fnEnable = !1;
14069
14070
  controllerTapHandler = this.handleControllerTap.bind(this);
14070
14071
  controllerPanStartHandler = this.handleControllerPanStart.bind(this);
14071
14072
  controllerPanMoveHandler = this.handleControllerPanMove.bind(this);
@@ -14085,7 +14086,10 @@ class DA extends rr {
14085
14086
  }
14086
14087
  multiSelectEnableChanged(t) {
14087
14088
  var e;
14088
- (e = this.scene) == null || e.clearSelected(), this.multiSelectEnable = !!t, this.controller.enablePan = !this.multiSelectEnable;
14089
+ (e = this.scene) == null || e.clearSelected(), this.multiSelectEnable = !!t, this.controller.enablePan = !this.multiSelectEnable || this.multiSelectEnable && !this.fnEnable;
14090
+ }
14091
+ fnEnableChanged(t) {
14092
+ this.fnEnable = !!t, this.controller.enablePan = !this.multiSelectEnable || this.multiSelectEnable && !this.fnEnable;
14089
14093
  }
14090
14094
  // controller events
14091
14095
  bindControllerEvents() {
@@ -14104,14 +14108,14 @@ class DA extends rr {
14104
14108
  });
14105
14109
  }
14106
14110
  handleControllerPanStart(t) {
14107
- (t == null ? void 0 : t.type) === ut.PAN_START && this.multiSelectEnable && (this.p1.copy(t.data.screenCoords), Hn.makeEmpty().expandByPoint(this.p1), this.graph.draw(Hn));
14111
+ (t == null ? void 0 : t.type) === ut.PAN_START && this.multiSelectEnable && (this.controller.enablePan || (this.p1.copy(t.data.screenCoords), Hn.makeEmpty().expandByPoint(this.p1), this.graph.draw(Hn)));
14108
14112
  }
14109
14113
  handleControllerPanMove(t) {
14110
- (t == null ? void 0 : t.type) === ut.PAN_MOVE && this.multiSelectEnable && (this.p2.copy(t.data.screenCoords), Hn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2), this.graph.draw(Hn));
14114
+ (t == null ? void 0 : t.type) === ut.PAN_MOVE && this.multiSelectEnable && (this.controller.enablePan || (this.p2.copy(t.data.screenCoords), Hn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2), this.graph.draw(Hn)));
14111
14115
  }
14112
14116
  handleControllerPanEnd(t) {
14113
14117
  var a;
14114
- if ((t == null ? void 0 : t.type) !== ut.PAN_END || !this.multiSelectEnable) return;
14118
+ if ((t == null ? void 0 : t.type) !== ut.PAN_END || !this.multiSelectEnable || this.controller.enablePan) return;
14115
14119
  this.p2.copy(t.data.screenCoords), Hn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera);
14116
14120
  const e = (a = this.scene) == null ? void 0 : a.getElementsByBox(Hn), i = [];
14117
14121
  (e || []).forEach((o) => i.push(o.id)), this.graph.hide(), Hn.makeEmpty(), this.dispatchEvent({ type: "SELECTED", data: { target: e, selected: i } });
@@ -17203,6 +17207,7 @@ class _b extends rr {
17203
17207
  zoomBox = new Dt();
17204
17208
  selectEnable = !1;
17205
17209
  multiSelectEnable = !1;
17210
+ fnEnable = !1;
17206
17211
  tween;
17207
17212
  animateDuration;
17208
17213
  label;
@@ -17263,6 +17268,9 @@ class _b extends rr {
17263
17268
  multiSelectEnableChanged(t) {
17264
17269
  this.multiSelectEnable = !!t, this.multiSelector.multiSelectEnableChanged(t);
17265
17270
  }
17271
+ fnEnableChanged(t) {
17272
+ this.fnEnable = !!t, this.multiSelector.fnEnableChanged(t);
17273
+ }
17266
17274
  // ================ events
17267
17275
  getIntersectObjects(t, e, i = []) {
17268
17276
  return this.scene ? this.scene.getIntersectObjects(t, e, i) : i;
@@ -17467,6 +17475,7 @@ class $b extends rr {
17467
17475
  zoomBox = new Dt();
17468
17476
  selectEnable = !1;
17469
17477
  multiSelectEnable = !1;
17478
+ fnEnable = !1;
17470
17479
  requestHeader = {};
17471
17480
  runningHandler = this.running.bind(this);
17472
17481
  pointerOverHandler = this.handlePointerOver.bind(this);
@@ -17615,9 +17624,9 @@ class $b extends rr {
17615
17624
  var e;
17616
17625
  (e = this.scene) == null || e.clearFillOrStrokeByIds(t, "stroke");
17617
17626
  }
17618
- setStrokeByIds(t, e) {
17619
- var i;
17620
- (i = this.scene) == null || i.setFillOrStrokeByIds(t, e, "stroke");
17627
+ setStrokeByIds(t, e, i) {
17628
+ var a;
17629
+ (a = this.scene) == null || a.setFillOrStrokeByIds(t, e, "stroke", i);
17621
17630
  }
17622
17631
  getLegend() {
17623
17632
  var t;
@@ -17703,6 +17712,9 @@ class $b extends rr {
17703
17712
  var e;
17704
17713
  (e = this.scene) == null || e.socialDistanceEnableChanged(t);
17705
17714
  }
17715
+ fnEnableChanged(t) {
17716
+ this.fnEnable = !!t, this.view.fnEnableChanged(t);
17717
+ }
17706
17718
  getBoundingBoxById(t, e = !0) {
17707
17719
  var a;
17708
17720
  if (!t) return;