microboard-temp 0.4.42 → 0.4.44
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/dist/cjs/browser.js +18 -24
- package/dist/cjs/index.js +18 -24
- package/dist/cjs/node.js +18 -24
- package/dist/esm/browser.js +18 -24
- package/dist/esm/index.js +18 -24
- package/dist/esm/node.js +18 -24
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -20870,12 +20870,9 @@ class SpatialIndex {
|
|
|
20870
20870
|
const items = this.itemsIndex.getEnclosed(mbr);
|
|
20871
20871
|
const children = [];
|
|
20872
20872
|
items.forEach((item) => {
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
children2.push(child);
|
|
20877
|
-
}
|
|
20878
|
-
});
|
|
20873
|
+
if ("index" in item && item.index) {
|
|
20874
|
+
children.push(...item.index.getEnclosed(left, top, right, bottom));
|
|
20875
|
+
}
|
|
20879
20876
|
});
|
|
20880
20877
|
return [...items, ...children];
|
|
20881
20878
|
}
|
|
@@ -20884,12 +20881,9 @@ class SpatialIndex {
|
|
|
20884
20881
|
const items = this.itemsIndex.getEnclosedOrCrossedBy(mbr);
|
|
20885
20882
|
const children = [];
|
|
20886
20883
|
items.forEach((item) => {
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20890
|
-
children2.push(child);
|
|
20891
|
-
}
|
|
20892
|
-
});
|
|
20884
|
+
if ("index" in item && item.index) {
|
|
20885
|
+
children.push(...item.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
20886
|
+
}
|
|
20893
20887
|
});
|
|
20894
20888
|
return [...items, ...children];
|
|
20895
20889
|
}
|
|
@@ -20897,12 +20891,9 @@ class SpatialIndex {
|
|
|
20897
20891
|
const items = this.itemsIndex.getUnderPoint(point3, tolerance);
|
|
20898
20892
|
const children = [];
|
|
20899
20893
|
items.forEach((item) => {
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
|
|
20903
|
-
children2.push(child);
|
|
20904
|
-
}
|
|
20905
|
-
});
|
|
20894
|
+
if ("index" in item && item.index) {
|
|
20895
|
+
children.push(...item.index.getUnderPoint(point3, tolerance));
|
|
20896
|
+
}
|
|
20906
20897
|
});
|
|
20907
20898
|
return [...items, ...children];
|
|
20908
20899
|
}
|
|
@@ -20911,10 +20902,9 @@ class SpatialIndex {
|
|
|
20911
20902
|
const items = this.itemsIndex.getRectsEnclosedOrCrossedBy(mbr);
|
|
20912
20903
|
const children = [];
|
|
20913
20904
|
items.forEach((item) => {
|
|
20914
|
-
|
|
20915
|
-
|
|
20916
|
-
|
|
20917
|
-
children2.push(child);
|
|
20905
|
+
items.forEach((item2) => {
|
|
20906
|
+
if ("index" in item2 && item2.index) {
|
|
20907
|
+
children.push(...item2.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
20918
20908
|
}
|
|
20919
20909
|
});
|
|
20920
20910
|
});
|
|
@@ -21310,6 +21300,7 @@ class SimpleSpatialIndex {
|
|
|
21310
21300
|
items.push(item);
|
|
21311
21301
|
}
|
|
21312
21302
|
});
|
|
21303
|
+
console.log("simple", items);
|
|
21313
21304
|
return items;
|
|
21314
21305
|
}
|
|
21315
21306
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -21320,6 +21311,7 @@ class SimpleSpatialIndex {
|
|
|
21320
21311
|
items.push(item);
|
|
21321
21312
|
}
|
|
21322
21313
|
});
|
|
21314
|
+
console.log("simple", items);
|
|
21323
21315
|
return items;
|
|
21324
21316
|
}
|
|
21325
21317
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -21329,12 +21321,14 @@ class SimpleSpatialIndex {
|
|
|
21329
21321
|
items.push(item);
|
|
21330
21322
|
}
|
|
21331
21323
|
});
|
|
21324
|
+
console.log("simple", items);
|
|
21332
21325
|
return items;
|
|
21333
21326
|
}
|
|
21334
21327
|
getMbr() {
|
|
21335
21328
|
return this.Mbr;
|
|
21336
21329
|
}
|
|
21337
21330
|
list() {
|
|
21331
|
+
console.log("simple list", this.itemsArray.concat());
|
|
21338
21332
|
return this.itemsArray.concat();
|
|
21339
21333
|
}
|
|
21340
21334
|
getZIndex(item) {
|
|
@@ -40282,7 +40276,7 @@ class Frame2 extends BaseItem {
|
|
|
40282
40276
|
return this.id;
|
|
40283
40277
|
}
|
|
40284
40278
|
getChildrenIds() {
|
|
40285
|
-
return this.
|
|
40279
|
+
return this.index?.list().map((item) => item.getId()) || [];
|
|
40286
40280
|
}
|
|
40287
40281
|
updateMbr() {
|
|
40288
40282
|
const rect = this.path.getMbr().copy();
|
|
@@ -52250,7 +52244,7 @@ class BoardSelection {
|
|
|
52250
52244
|
};
|
|
52251
52245
|
}
|
|
52252
52246
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
52253
|
-
if (!(selectedItem
|
|
52247
|
+
if (!("index" in selectedItem) && !selectedItem.index) {
|
|
52254
52248
|
return;
|
|
52255
52249
|
}
|
|
52256
52250
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -20870,12 +20870,9 @@ class SpatialIndex {
|
|
|
20870
20870
|
const items = this.itemsIndex.getEnclosed(mbr);
|
|
20871
20871
|
const children = [];
|
|
20872
20872
|
items.forEach((item) => {
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
children2.push(child);
|
|
20877
|
-
}
|
|
20878
|
-
});
|
|
20873
|
+
if ("index" in item && item.index) {
|
|
20874
|
+
children.push(...item.index.getEnclosed(left, top, right, bottom));
|
|
20875
|
+
}
|
|
20879
20876
|
});
|
|
20880
20877
|
return [...items, ...children];
|
|
20881
20878
|
}
|
|
@@ -20884,12 +20881,9 @@ class SpatialIndex {
|
|
|
20884
20881
|
const items = this.itemsIndex.getEnclosedOrCrossedBy(mbr);
|
|
20885
20882
|
const children = [];
|
|
20886
20883
|
items.forEach((item) => {
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20890
|
-
children2.push(child);
|
|
20891
|
-
}
|
|
20892
|
-
});
|
|
20884
|
+
if ("index" in item && item.index) {
|
|
20885
|
+
children.push(...item.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
20886
|
+
}
|
|
20893
20887
|
});
|
|
20894
20888
|
return [...items, ...children];
|
|
20895
20889
|
}
|
|
@@ -20897,12 +20891,9 @@ class SpatialIndex {
|
|
|
20897
20891
|
const items = this.itemsIndex.getUnderPoint(point3, tolerance);
|
|
20898
20892
|
const children = [];
|
|
20899
20893
|
items.forEach((item) => {
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
|
|
20903
|
-
children2.push(child);
|
|
20904
|
-
}
|
|
20905
|
-
});
|
|
20894
|
+
if ("index" in item && item.index) {
|
|
20895
|
+
children.push(...item.index.getUnderPoint(point3, tolerance));
|
|
20896
|
+
}
|
|
20906
20897
|
});
|
|
20907
20898
|
return [...items, ...children];
|
|
20908
20899
|
}
|
|
@@ -20911,10 +20902,9 @@ class SpatialIndex {
|
|
|
20911
20902
|
const items = this.itemsIndex.getRectsEnclosedOrCrossedBy(mbr);
|
|
20912
20903
|
const children = [];
|
|
20913
20904
|
items.forEach((item) => {
|
|
20914
|
-
|
|
20915
|
-
|
|
20916
|
-
|
|
20917
|
-
children2.push(child);
|
|
20905
|
+
items.forEach((item2) => {
|
|
20906
|
+
if ("index" in item2 && item2.index) {
|
|
20907
|
+
children.push(...item2.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
20918
20908
|
}
|
|
20919
20909
|
});
|
|
20920
20910
|
});
|
|
@@ -21310,6 +21300,7 @@ class SimpleSpatialIndex {
|
|
|
21310
21300
|
items.push(item);
|
|
21311
21301
|
}
|
|
21312
21302
|
});
|
|
21303
|
+
console.log("simple", items);
|
|
21313
21304
|
return items;
|
|
21314
21305
|
}
|
|
21315
21306
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -21320,6 +21311,7 @@ class SimpleSpatialIndex {
|
|
|
21320
21311
|
items.push(item);
|
|
21321
21312
|
}
|
|
21322
21313
|
});
|
|
21314
|
+
console.log("simple", items);
|
|
21323
21315
|
return items;
|
|
21324
21316
|
}
|
|
21325
21317
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -21329,12 +21321,14 @@ class SimpleSpatialIndex {
|
|
|
21329
21321
|
items.push(item);
|
|
21330
21322
|
}
|
|
21331
21323
|
});
|
|
21324
|
+
console.log("simple", items);
|
|
21332
21325
|
return items;
|
|
21333
21326
|
}
|
|
21334
21327
|
getMbr() {
|
|
21335
21328
|
return this.Mbr;
|
|
21336
21329
|
}
|
|
21337
21330
|
list() {
|
|
21331
|
+
console.log("simple list", this.itemsArray.concat());
|
|
21338
21332
|
return this.itemsArray.concat();
|
|
21339
21333
|
}
|
|
21340
21334
|
getZIndex(item) {
|
|
@@ -40282,7 +40276,7 @@ class Frame2 extends BaseItem {
|
|
|
40282
40276
|
return this.id;
|
|
40283
40277
|
}
|
|
40284
40278
|
getChildrenIds() {
|
|
40285
|
-
return this.
|
|
40279
|
+
return this.index?.list().map((item) => item.getId()) || [];
|
|
40286
40280
|
}
|
|
40287
40281
|
updateMbr() {
|
|
40288
40282
|
const rect = this.path.getMbr().copy();
|
|
@@ -52250,7 +52244,7 @@ class BoardSelection {
|
|
|
52250
52244
|
};
|
|
52251
52245
|
}
|
|
52252
52246
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
52253
|
-
if (!(selectedItem
|
|
52247
|
+
if (!("index" in selectedItem) && !selectedItem.index) {
|
|
52254
52248
|
return;
|
|
52255
52249
|
}
|
|
52256
52250
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/cjs/node.js
CHANGED
|
@@ -23342,12 +23342,9 @@ class SpatialIndex {
|
|
|
23342
23342
|
const items = this.itemsIndex.getEnclosed(mbr);
|
|
23343
23343
|
const children = [];
|
|
23344
23344
|
items.forEach((item) => {
|
|
23345
|
-
|
|
23346
|
-
|
|
23347
|
-
|
|
23348
|
-
children2.push(child);
|
|
23349
|
-
}
|
|
23350
|
-
});
|
|
23345
|
+
if ("index" in item && item.index) {
|
|
23346
|
+
children.push(...item.index.getEnclosed(left, top, right, bottom));
|
|
23347
|
+
}
|
|
23351
23348
|
});
|
|
23352
23349
|
return [...items, ...children];
|
|
23353
23350
|
}
|
|
@@ -23356,12 +23353,9 @@ class SpatialIndex {
|
|
|
23356
23353
|
const items = this.itemsIndex.getEnclosedOrCrossedBy(mbr);
|
|
23357
23354
|
const children = [];
|
|
23358
23355
|
items.forEach((item) => {
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
|
|
23362
|
-
children2.push(child);
|
|
23363
|
-
}
|
|
23364
|
-
});
|
|
23356
|
+
if ("index" in item && item.index) {
|
|
23357
|
+
children.push(...item.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
23358
|
+
}
|
|
23365
23359
|
});
|
|
23366
23360
|
return [...items, ...children];
|
|
23367
23361
|
}
|
|
@@ -23369,12 +23363,9 @@ class SpatialIndex {
|
|
|
23369
23363
|
const items = this.itemsIndex.getUnderPoint(point3, tolerance);
|
|
23370
23364
|
const children = [];
|
|
23371
23365
|
items.forEach((item) => {
|
|
23372
|
-
|
|
23373
|
-
|
|
23374
|
-
|
|
23375
|
-
children2.push(child);
|
|
23376
|
-
}
|
|
23377
|
-
});
|
|
23366
|
+
if ("index" in item && item.index) {
|
|
23367
|
+
children.push(...item.index.getUnderPoint(point3, tolerance));
|
|
23368
|
+
}
|
|
23378
23369
|
});
|
|
23379
23370
|
return [...items, ...children];
|
|
23380
23371
|
}
|
|
@@ -23383,10 +23374,9 @@ class SpatialIndex {
|
|
|
23383
23374
|
const items = this.itemsIndex.getRectsEnclosedOrCrossedBy(mbr);
|
|
23384
23375
|
const children = [];
|
|
23385
23376
|
items.forEach((item) => {
|
|
23386
|
-
|
|
23387
|
-
|
|
23388
|
-
|
|
23389
|
-
children2.push(child);
|
|
23377
|
+
items.forEach((item2) => {
|
|
23378
|
+
if ("index" in item2 && item2.index) {
|
|
23379
|
+
children.push(...item2.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
23390
23380
|
}
|
|
23391
23381
|
});
|
|
23392
23382
|
});
|
|
@@ -23782,6 +23772,7 @@ class SimpleSpatialIndex {
|
|
|
23782
23772
|
items.push(item);
|
|
23783
23773
|
}
|
|
23784
23774
|
});
|
|
23775
|
+
console.log("simple", items);
|
|
23785
23776
|
return items;
|
|
23786
23777
|
}
|
|
23787
23778
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -23792,6 +23783,7 @@ class SimpleSpatialIndex {
|
|
|
23792
23783
|
items.push(item);
|
|
23793
23784
|
}
|
|
23794
23785
|
});
|
|
23786
|
+
console.log("simple", items);
|
|
23795
23787
|
return items;
|
|
23796
23788
|
}
|
|
23797
23789
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -23801,12 +23793,14 @@ class SimpleSpatialIndex {
|
|
|
23801
23793
|
items.push(item);
|
|
23802
23794
|
}
|
|
23803
23795
|
});
|
|
23796
|
+
console.log("simple", items);
|
|
23804
23797
|
return items;
|
|
23805
23798
|
}
|
|
23806
23799
|
getMbr() {
|
|
23807
23800
|
return this.Mbr;
|
|
23808
23801
|
}
|
|
23809
23802
|
list() {
|
|
23803
|
+
console.log("simple list", this.itemsArray.concat());
|
|
23810
23804
|
return this.itemsArray.concat();
|
|
23811
23805
|
}
|
|
23812
23806
|
getZIndex(item) {
|
|
@@ -42755,7 +42749,7 @@ class Frame2 extends BaseItem {
|
|
|
42755
42749
|
return this.id;
|
|
42756
42750
|
}
|
|
42757
42751
|
getChildrenIds() {
|
|
42758
|
-
return this.
|
|
42752
|
+
return this.index?.list().map((item) => item.getId()) || [];
|
|
42759
42753
|
}
|
|
42760
42754
|
updateMbr() {
|
|
42761
42755
|
const rect = this.path.getMbr().copy();
|
|
@@ -54723,7 +54717,7 @@ class BoardSelection {
|
|
|
54723
54717
|
};
|
|
54724
54718
|
}
|
|
54725
54719
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
54726
|
-
if (!(selectedItem
|
|
54720
|
+
if (!("index" in selectedItem) && !selectedItem.index) {
|
|
54727
54721
|
return;
|
|
54728
54722
|
}
|
|
54729
54723
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/esm/browser.js
CHANGED
|
@@ -20720,12 +20720,9 @@ class SpatialIndex {
|
|
|
20720
20720
|
const items = this.itemsIndex.getEnclosed(mbr);
|
|
20721
20721
|
const children = [];
|
|
20722
20722
|
items.forEach((item) => {
|
|
20723
|
-
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
children2.push(child);
|
|
20727
|
-
}
|
|
20728
|
-
});
|
|
20723
|
+
if ("index" in item && item.index) {
|
|
20724
|
+
children.push(...item.index.getEnclosed(left, top, right, bottom));
|
|
20725
|
+
}
|
|
20729
20726
|
});
|
|
20730
20727
|
return [...items, ...children];
|
|
20731
20728
|
}
|
|
@@ -20734,12 +20731,9 @@ class SpatialIndex {
|
|
|
20734
20731
|
const items = this.itemsIndex.getEnclosedOrCrossedBy(mbr);
|
|
20735
20732
|
const children = [];
|
|
20736
20733
|
items.forEach((item) => {
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
children2.push(child);
|
|
20741
|
-
}
|
|
20742
|
-
});
|
|
20734
|
+
if ("index" in item && item.index) {
|
|
20735
|
+
children.push(...item.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
20736
|
+
}
|
|
20743
20737
|
});
|
|
20744
20738
|
return [...items, ...children];
|
|
20745
20739
|
}
|
|
@@ -20747,12 +20741,9 @@ class SpatialIndex {
|
|
|
20747
20741
|
const items = this.itemsIndex.getUnderPoint(point3, tolerance);
|
|
20748
20742
|
const children = [];
|
|
20749
20743
|
items.forEach((item) => {
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
children2.push(child);
|
|
20754
|
-
}
|
|
20755
|
-
});
|
|
20744
|
+
if ("index" in item && item.index) {
|
|
20745
|
+
children.push(...item.index.getUnderPoint(point3, tolerance));
|
|
20746
|
+
}
|
|
20756
20747
|
});
|
|
20757
20748
|
return [...items, ...children];
|
|
20758
20749
|
}
|
|
@@ -20761,10 +20752,9 @@ class SpatialIndex {
|
|
|
20761
20752
|
const items = this.itemsIndex.getRectsEnclosedOrCrossedBy(mbr);
|
|
20762
20753
|
const children = [];
|
|
20763
20754
|
items.forEach((item) => {
|
|
20764
|
-
|
|
20765
|
-
|
|
20766
|
-
|
|
20767
|
-
children2.push(child);
|
|
20755
|
+
items.forEach((item2) => {
|
|
20756
|
+
if ("index" in item2 && item2.index) {
|
|
20757
|
+
children.push(...item2.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
20768
20758
|
}
|
|
20769
20759
|
});
|
|
20770
20760
|
});
|
|
@@ -21160,6 +21150,7 @@ class SimpleSpatialIndex {
|
|
|
21160
21150
|
items.push(item);
|
|
21161
21151
|
}
|
|
21162
21152
|
});
|
|
21153
|
+
console.log("simple", items);
|
|
21163
21154
|
return items;
|
|
21164
21155
|
}
|
|
21165
21156
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -21170,6 +21161,7 @@ class SimpleSpatialIndex {
|
|
|
21170
21161
|
items.push(item);
|
|
21171
21162
|
}
|
|
21172
21163
|
});
|
|
21164
|
+
console.log("simple", items);
|
|
21173
21165
|
return items;
|
|
21174
21166
|
}
|
|
21175
21167
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -21179,12 +21171,14 @@ class SimpleSpatialIndex {
|
|
|
21179
21171
|
items.push(item);
|
|
21180
21172
|
}
|
|
21181
21173
|
});
|
|
21174
|
+
console.log("simple", items);
|
|
21182
21175
|
return items;
|
|
21183
21176
|
}
|
|
21184
21177
|
getMbr() {
|
|
21185
21178
|
return this.Mbr;
|
|
21186
21179
|
}
|
|
21187
21180
|
list() {
|
|
21181
|
+
console.log("simple list", this.itemsArray.concat());
|
|
21188
21182
|
return this.itemsArray.concat();
|
|
21189
21183
|
}
|
|
21190
21184
|
getZIndex(item) {
|
|
@@ -40132,7 +40126,7 @@ class Frame2 extends BaseItem {
|
|
|
40132
40126
|
return this.id;
|
|
40133
40127
|
}
|
|
40134
40128
|
getChildrenIds() {
|
|
40135
|
-
return this.
|
|
40129
|
+
return this.index?.list().map((item) => item.getId()) || [];
|
|
40136
40130
|
}
|
|
40137
40131
|
updateMbr() {
|
|
40138
40132
|
const rect = this.path.getMbr().copy();
|
|
@@ -52100,7 +52094,7 @@ class BoardSelection {
|
|
|
52100
52094
|
};
|
|
52101
52095
|
}
|
|
52102
52096
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
52103
|
-
if (!(selectedItem
|
|
52097
|
+
if (!("index" in selectedItem) && !selectedItem.index) {
|
|
52104
52098
|
return;
|
|
52105
52099
|
}
|
|
52106
52100
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/esm/index.js
CHANGED
|
@@ -20713,12 +20713,9 @@ class SpatialIndex {
|
|
|
20713
20713
|
const items = this.itemsIndex.getEnclosed(mbr);
|
|
20714
20714
|
const children = [];
|
|
20715
20715
|
items.forEach((item) => {
|
|
20716
|
-
|
|
20717
|
-
|
|
20718
|
-
|
|
20719
|
-
children2.push(child);
|
|
20720
|
-
}
|
|
20721
|
-
});
|
|
20716
|
+
if ("index" in item && item.index) {
|
|
20717
|
+
children.push(...item.index.getEnclosed(left, top, right, bottom));
|
|
20718
|
+
}
|
|
20722
20719
|
});
|
|
20723
20720
|
return [...items, ...children];
|
|
20724
20721
|
}
|
|
@@ -20727,12 +20724,9 @@ class SpatialIndex {
|
|
|
20727
20724
|
const items = this.itemsIndex.getEnclosedOrCrossedBy(mbr);
|
|
20728
20725
|
const children = [];
|
|
20729
20726
|
items.forEach((item) => {
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
children2.push(child);
|
|
20734
|
-
}
|
|
20735
|
-
});
|
|
20727
|
+
if ("index" in item && item.index) {
|
|
20728
|
+
children.push(...item.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
20729
|
+
}
|
|
20736
20730
|
});
|
|
20737
20731
|
return [...items, ...children];
|
|
20738
20732
|
}
|
|
@@ -20740,12 +20734,9 @@ class SpatialIndex {
|
|
|
20740
20734
|
const items = this.itemsIndex.getUnderPoint(point3, tolerance);
|
|
20741
20735
|
const children = [];
|
|
20742
20736
|
items.forEach((item) => {
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
|
|
20746
|
-
children2.push(child);
|
|
20747
|
-
}
|
|
20748
|
-
});
|
|
20737
|
+
if ("index" in item && item.index) {
|
|
20738
|
+
children.push(...item.index.getUnderPoint(point3, tolerance));
|
|
20739
|
+
}
|
|
20749
20740
|
});
|
|
20750
20741
|
return [...items, ...children];
|
|
20751
20742
|
}
|
|
@@ -20754,10 +20745,9 @@ class SpatialIndex {
|
|
|
20754
20745
|
const items = this.itemsIndex.getRectsEnclosedOrCrossedBy(mbr);
|
|
20755
20746
|
const children = [];
|
|
20756
20747
|
items.forEach((item) => {
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
children2.push(child);
|
|
20748
|
+
items.forEach((item2) => {
|
|
20749
|
+
if ("index" in item2 && item2.index) {
|
|
20750
|
+
children.push(...item2.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
20761
20751
|
}
|
|
20762
20752
|
});
|
|
20763
20753
|
});
|
|
@@ -21153,6 +21143,7 @@ class SimpleSpatialIndex {
|
|
|
21153
21143
|
items.push(item);
|
|
21154
21144
|
}
|
|
21155
21145
|
});
|
|
21146
|
+
console.log("simple", items);
|
|
21156
21147
|
return items;
|
|
21157
21148
|
}
|
|
21158
21149
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -21163,6 +21154,7 @@ class SimpleSpatialIndex {
|
|
|
21163
21154
|
items.push(item);
|
|
21164
21155
|
}
|
|
21165
21156
|
});
|
|
21157
|
+
console.log("simple", items);
|
|
21166
21158
|
return items;
|
|
21167
21159
|
}
|
|
21168
21160
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -21172,12 +21164,14 @@ class SimpleSpatialIndex {
|
|
|
21172
21164
|
items.push(item);
|
|
21173
21165
|
}
|
|
21174
21166
|
});
|
|
21167
|
+
console.log("simple", items);
|
|
21175
21168
|
return items;
|
|
21176
21169
|
}
|
|
21177
21170
|
getMbr() {
|
|
21178
21171
|
return this.Mbr;
|
|
21179
21172
|
}
|
|
21180
21173
|
list() {
|
|
21174
|
+
console.log("simple list", this.itemsArray.concat());
|
|
21181
21175
|
return this.itemsArray.concat();
|
|
21182
21176
|
}
|
|
21183
21177
|
getZIndex(item) {
|
|
@@ -40125,7 +40119,7 @@ class Frame2 extends BaseItem {
|
|
|
40125
40119
|
return this.id;
|
|
40126
40120
|
}
|
|
40127
40121
|
getChildrenIds() {
|
|
40128
|
-
return this.
|
|
40122
|
+
return this.index?.list().map((item) => item.getId()) || [];
|
|
40129
40123
|
}
|
|
40130
40124
|
updateMbr() {
|
|
40131
40125
|
const rect = this.path.getMbr().copy();
|
|
@@ -52093,7 +52087,7 @@ class BoardSelection {
|
|
|
52093
52087
|
};
|
|
52094
52088
|
}
|
|
52095
52089
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
52096
|
-
if (!(selectedItem
|
|
52090
|
+
if (!("index" in selectedItem) && !selectedItem.index) {
|
|
52097
52091
|
return;
|
|
52098
52092
|
}
|
|
52099
52093
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/esm/node.js
CHANGED
|
@@ -23180,12 +23180,9 @@ class SpatialIndex {
|
|
|
23180
23180
|
const items = this.itemsIndex.getEnclosed(mbr);
|
|
23181
23181
|
const children = [];
|
|
23182
23182
|
items.forEach((item) => {
|
|
23183
|
-
|
|
23184
|
-
|
|
23185
|
-
|
|
23186
|
-
children2.push(child);
|
|
23187
|
-
}
|
|
23188
|
-
});
|
|
23183
|
+
if ("index" in item && item.index) {
|
|
23184
|
+
children.push(...item.index.getEnclosed(left, top, right, bottom));
|
|
23185
|
+
}
|
|
23189
23186
|
});
|
|
23190
23187
|
return [...items, ...children];
|
|
23191
23188
|
}
|
|
@@ -23194,12 +23191,9 @@ class SpatialIndex {
|
|
|
23194
23191
|
const items = this.itemsIndex.getEnclosedOrCrossedBy(mbr);
|
|
23195
23192
|
const children = [];
|
|
23196
23193
|
items.forEach((item) => {
|
|
23197
|
-
|
|
23198
|
-
|
|
23199
|
-
|
|
23200
|
-
children2.push(child);
|
|
23201
|
-
}
|
|
23202
|
-
});
|
|
23194
|
+
if ("index" in item && item.index) {
|
|
23195
|
+
children.push(...item.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
23196
|
+
}
|
|
23203
23197
|
});
|
|
23204
23198
|
return [...items, ...children];
|
|
23205
23199
|
}
|
|
@@ -23207,12 +23201,9 @@ class SpatialIndex {
|
|
|
23207
23201
|
const items = this.itemsIndex.getUnderPoint(point3, tolerance);
|
|
23208
23202
|
const children = [];
|
|
23209
23203
|
items.forEach((item) => {
|
|
23210
|
-
|
|
23211
|
-
|
|
23212
|
-
|
|
23213
|
-
children2.push(child);
|
|
23214
|
-
}
|
|
23215
|
-
});
|
|
23204
|
+
if ("index" in item && item.index) {
|
|
23205
|
+
children.push(...item.index.getUnderPoint(point3, tolerance));
|
|
23206
|
+
}
|
|
23216
23207
|
});
|
|
23217
23208
|
return [...items, ...children];
|
|
23218
23209
|
}
|
|
@@ -23221,10 +23212,9 @@ class SpatialIndex {
|
|
|
23221
23212
|
const items = this.itemsIndex.getRectsEnclosedOrCrossedBy(mbr);
|
|
23222
23213
|
const children = [];
|
|
23223
23214
|
items.forEach((item) => {
|
|
23224
|
-
|
|
23225
|
-
|
|
23226
|
-
|
|
23227
|
-
children2.push(child);
|
|
23215
|
+
items.forEach((item2) => {
|
|
23216
|
+
if ("index" in item2 && item2.index) {
|
|
23217
|
+
children.push(...item2.index.getEnclosedOrCrossed(left, top, right, bottom));
|
|
23228
23218
|
}
|
|
23229
23219
|
});
|
|
23230
23220
|
});
|
|
@@ -23620,6 +23610,7 @@ class SimpleSpatialIndex {
|
|
|
23620
23610
|
items.push(item);
|
|
23621
23611
|
}
|
|
23622
23612
|
});
|
|
23613
|
+
console.log("simple", items);
|
|
23623
23614
|
return items;
|
|
23624
23615
|
}
|
|
23625
23616
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -23630,6 +23621,7 @@ class SimpleSpatialIndex {
|
|
|
23630
23621
|
items.push(item);
|
|
23631
23622
|
}
|
|
23632
23623
|
});
|
|
23624
|
+
console.log("simple", items);
|
|
23633
23625
|
return items;
|
|
23634
23626
|
}
|
|
23635
23627
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -23639,12 +23631,14 @@ class SimpleSpatialIndex {
|
|
|
23639
23631
|
items.push(item);
|
|
23640
23632
|
}
|
|
23641
23633
|
});
|
|
23634
|
+
console.log("simple", items);
|
|
23642
23635
|
return items;
|
|
23643
23636
|
}
|
|
23644
23637
|
getMbr() {
|
|
23645
23638
|
return this.Mbr;
|
|
23646
23639
|
}
|
|
23647
23640
|
list() {
|
|
23641
|
+
console.log("simple list", this.itemsArray.concat());
|
|
23648
23642
|
return this.itemsArray.concat();
|
|
23649
23643
|
}
|
|
23650
23644
|
getZIndex(item) {
|
|
@@ -42593,7 +42587,7 @@ class Frame2 extends BaseItem {
|
|
|
42593
42587
|
return this.id;
|
|
42594
42588
|
}
|
|
42595
42589
|
getChildrenIds() {
|
|
42596
|
-
return this.
|
|
42590
|
+
return this.index?.list().map((item) => item.getId()) || [];
|
|
42597
42591
|
}
|
|
42598
42592
|
updateMbr() {
|
|
42599
42593
|
const rect = this.path.getMbr().copy();
|
|
@@ -54561,7 +54555,7 @@ class BoardSelection {
|
|
|
54561
54555
|
};
|
|
54562
54556
|
}
|
|
54563
54557
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
54564
|
-
if (!(selectedItem
|
|
54558
|
+
if (!("index" in selectedItem) && !selectedItem.index) {
|
|
54565
54559
|
return;
|
|
54566
54560
|
}
|
|
54567
54561
|
for (const childId of selectedItem.getChildrenIds()) {
|