microboard-temp 0.4.47 → 0.4.49
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 +5 -9
- package/dist/cjs/index.js +5 -9
- package/dist/cjs/node.js +5 -9
- package/dist/esm/browser.js +5 -9
- package/dist/esm/index.js +5 -9
- package/dist/esm/node.js +5 -9
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -21300,7 +21300,6 @@ class SimpleSpatialIndex {
|
|
|
21300
21300
|
items.push(item);
|
|
21301
21301
|
}
|
|
21302
21302
|
});
|
|
21303
|
-
console.log("simple", items);
|
|
21304
21303
|
return items;
|
|
21305
21304
|
}
|
|
21306
21305
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -21311,7 +21310,6 @@ class SimpleSpatialIndex {
|
|
|
21311
21310
|
items.push(item);
|
|
21312
21311
|
}
|
|
21313
21312
|
});
|
|
21314
|
-
console.log("simple", items);
|
|
21315
21313
|
return items;
|
|
21316
21314
|
}
|
|
21317
21315
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -21321,14 +21319,12 @@ class SimpleSpatialIndex {
|
|
|
21321
21319
|
items.push(item);
|
|
21322
21320
|
}
|
|
21323
21321
|
});
|
|
21324
|
-
console.log("simple", items);
|
|
21325
21322
|
return items;
|
|
21326
21323
|
}
|
|
21327
21324
|
getMbr() {
|
|
21328
21325
|
return this.Mbr;
|
|
21329
21326
|
}
|
|
21330
21327
|
list() {
|
|
21331
|
-
console.log("simple list", this.itemsArray.concat());
|
|
21332
21328
|
return this.itemsArray.concat();
|
|
21333
21329
|
}
|
|
21334
21330
|
getZIndex(item) {
|
|
@@ -45591,7 +45587,7 @@ class AlignmentHelper {
|
|
|
45591
45587
|
const cameraWidth = camera.getWidth();
|
|
45592
45588
|
const scale = this.board.camera.getScale();
|
|
45593
45589
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
45594
|
-
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
45590
|
+
const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
|
|
45595
45591
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
45596
45592
|
const verticalAlignments = new Map;
|
|
45597
45593
|
const horizontalAlignments = new Map;
|
|
@@ -46499,10 +46495,10 @@ class Select extends Tool {
|
|
|
46499
46495
|
if ("index" in underPointer && underPointer.index) {
|
|
46500
46496
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
46501
46497
|
const childrenIds = underPointer.getChildrenIds();
|
|
46502
|
-
|
|
46503
|
-
|
|
46504
|
-
|
|
46505
|
-
|
|
46498
|
+
console.log("UNDERPOINTER", underPointer);
|
|
46499
|
+
console.log("CHILDREN", childrenIds);
|
|
46500
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds && childrenIds.includes(item.getId()));
|
|
46501
|
+
this.board.selection.add(itemsInFrame);
|
|
46506
46502
|
}
|
|
46507
46503
|
this.board.selection.setContext("EditUnderPointer");
|
|
46508
46504
|
} else {
|
package/dist/cjs/index.js
CHANGED
|
@@ -21300,7 +21300,6 @@ class SimpleSpatialIndex {
|
|
|
21300
21300
|
items.push(item);
|
|
21301
21301
|
}
|
|
21302
21302
|
});
|
|
21303
|
-
console.log("simple", items);
|
|
21304
21303
|
return items;
|
|
21305
21304
|
}
|
|
21306
21305
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -21311,7 +21310,6 @@ class SimpleSpatialIndex {
|
|
|
21311
21310
|
items.push(item);
|
|
21312
21311
|
}
|
|
21313
21312
|
});
|
|
21314
|
-
console.log("simple", items);
|
|
21315
21313
|
return items;
|
|
21316
21314
|
}
|
|
21317
21315
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -21321,14 +21319,12 @@ class SimpleSpatialIndex {
|
|
|
21321
21319
|
items.push(item);
|
|
21322
21320
|
}
|
|
21323
21321
|
});
|
|
21324
|
-
console.log("simple", items);
|
|
21325
21322
|
return items;
|
|
21326
21323
|
}
|
|
21327
21324
|
getMbr() {
|
|
21328
21325
|
return this.Mbr;
|
|
21329
21326
|
}
|
|
21330
21327
|
list() {
|
|
21331
|
-
console.log("simple list", this.itemsArray.concat());
|
|
21332
21328
|
return this.itemsArray.concat();
|
|
21333
21329
|
}
|
|
21334
21330
|
getZIndex(item) {
|
|
@@ -45591,7 +45587,7 @@ class AlignmentHelper {
|
|
|
45591
45587
|
const cameraWidth = camera.getWidth();
|
|
45592
45588
|
const scale = this.board.camera.getScale();
|
|
45593
45589
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
45594
|
-
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
45590
|
+
const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
|
|
45595
45591
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
45596
45592
|
const verticalAlignments = new Map;
|
|
45597
45593
|
const horizontalAlignments = new Map;
|
|
@@ -46499,10 +46495,10 @@ class Select extends Tool {
|
|
|
46499
46495
|
if ("index" in underPointer && underPointer.index) {
|
|
46500
46496
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
46501
46497
|
const childrenIds = underPointer.getChildrenIds();
|
|
46502
|
-
|
|
46503
|
-
|
|
46504
|
-
|
|
46505
|
-
|
|
46498
|
+
console.log("UNDERPOINTER", underPointer);
|
|
46499
|
+
console.log("CHILDREN", childrenIds);
|
|
46500
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds && childrenIds.includes(item.getId()));
|
|
46501
|
+
this.board.selection.add(itemsInFrame);
|
|
46506
46502
|
}
|
|
46507
46503
|
this.board.selection.setContext("EditUnderPointer");
|
|
46508
46504
|
} else {
|
package/dist/cjs/node.js
CHANGED
|
@@ -23772,7 +23772,6 @@ class SimpleSpatialIndex {
|
|
|
23772
23772
|
items.push(item);
|
|
23773
23773
|
}
|
|
23774
23774
|
});
|
|
23775
|
-
console.log("simple", items);
|
|
23776
23775
|
return items;
|
|
23777
23776
|
}
|
|
23778
23777
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -23783,7 +23782,6 @@ class SimpleSpatialIndex {
|
|
|
23783
23782
|
items.push(item);
|
|
23784
23783
|
}
|
|
23785
23784
|
});
|
|
23786
|
-
console.log("simple", items);
|
|
23787
23785
|
return items;
|
|
23788
23786
|
}
|
|
23789
23787
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -23793,14 +23791,12 @@ class SimpleSpatialIndex {
|
|
|
23793
23791
|
items.push(item);
|
|
23794
23792
|
}
|
|
23795
23793
|
});
|
|
23796
|
-
console.log("simple", items);
|
|
23797
23794
|
return items;
|
|
23798
23795
|
}
|
|
23799
23796
|
getMbr() {
|
|
23800
23797
|
return this.Mbr;
|
|
23801
23798
|
}
|
|
23802
23799
|
list() {
|
|
23803
|
-
console.log("simple list", this.itemsArray.concat());
|
|
23804
23800
|
return this.itemsArray.concat();
|
|
23805
23801
|
}
|
|
23806
23802
|
getZIndex(item) {
|
|
@@ -48064,7 +48060,7 @@ class AlignmentHelper {
|
|
|
48064
48060
|
const cameraWidth = camera.getWidth();
|
|
48065
48061
|
const scale = this.board.camera.getScale();
|
|
48066
48062
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
48067
|
-
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
48063
|
+
const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
|
|
48068
48064
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
48069
48065
|
const verticalAlignments = new Map;
|
|
48070
48066
|
const horizontalAlignments = new Map;
|
|
@@ -48972,10 +48968,10 @@ class Select extends Tool {
|
|
|
48972
48968
|
if ("index" in underPointer && underPointer.index) {
|
|
48973
48969
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
48974
48970
|
const childrenIds = underPointer.getChildrenIds();
|
|
48975
|
-
|
|
48976
|
-
|
|
48977
|
-
|
|
48978
|
-
|
|
48971
|
+
console.log("UNDERPOINTER", underPointer);
|
|
48972
|
+
console.log("CHILDREN", childrenIds);
|
|
48973
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds && childrenIds.includes(item.getId()));
|
|
48974
|
+
this.board.selection.add(itemsInFrame);
|
|
48979
48975
|
}
|
|
48980
48976
|
this.board.selection.setContext("EditUnderPointer");
|
|
48981
48977
|
} else {
|
package/dist/esm/browser.js
CHANGED
|
@@ -21150,7 +21150,6 @@ class SimpleSpatialIndex {
|
|
|
21150
21150
|
items.push(item);
|
|
21151
21151
|
}
|
|
21152
21152
|
});
|
|
21153
|
-
console.log("simple", items);
|
|
21154
21153
|
return items;
|
|
21155
21154
|
}
|
|
21156
21155
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -21161,7 +21160,6 @@ class SimpleSpatialIndex {
|
|
|
21161
21160
|
items.push(item);
|
|
21162
21161
|
}
|
|
21163
21162
|
});
|
|
21164
|
-
console.log("simple", items);
|
|
21165
21163
|
return items;
|
|
21166
21164
|
}
|
|
21167
21165
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -21171,14 +21169,12 @@ class SimpleSpatialIndex {
|
|
|
21171
21169
|
items.push(item);
|
|
21172
21170
|
}
|
|
21173
21171
|
});
|
|
21174
|
-
console.log("simple", items);
|
|
21175
21172
|
return items;
|
|
21176
21173
|
}
|
|
21177
21174
|
getMbr() {
|
|
21178
21175
|
return this.Mbr;
|
|
21179
21176
|
}
|
|
21180
21177
|
list() {
|
|
21181
|
-
console.log("simple list", this.itemsArray.concat());
|
|
21182
21178
|
return this.itemsArray.concat();
|
|
21183
21179
|
}
|
|
21184
21180
|
getZIndex(item) {
|
|
@@ -45441,7 +45437,7 @@ class AlignmentHelper {
|
|
|
45441
45437
|
const cameraWidth = camera.getWidth();
|
|
45442
45438
|
const scale = this.board.camera.getScale();
|
|
45443
45439
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
45444
|
-
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
45440
|
+
const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
|
|
45445
45441
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
45446
45442
|
const verticalAlignments = new Map;
|
|
45447
45443
|
const horizontalAlignments = new Map;
|
|
@@ -46349,10 +46345,10 @@ class Select extends Tool {
|
|
|
46349
46345
|
if ("index" in underPointer && underPointer.index) {
|
|
46350
46346
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
46351
46347
|
const childrenIds = underPointer.getChildrenIds();
|
|
46352
|
-
|
|
46353
|
-
|
|
46354
|
-
|
|
46355
|
-
|
|
46348
|
+
console.log("UNDERPOINTER", underPointer);
|
|
46349
|
+
console.log("CHILDREN", childrenIds);
|
|
46350
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds && childrenIds.includes(item.getId()));
|
|
46351
|
+
this.board.selection.add(itemsInFrame);
|
|
46356
46352
|
}
|
|
46357
46353
|
this.board.selection.setContext("EditUnderPointer");
|
|
46358
46354
|
} else {
|
package/dist/esm/index.js
CHANGED
|
@@ -21143,7 +21143,6 @@ class SimpleSpatialIndex {
|
|
|
21143
21143
|
items.push(item);
|
|
21144
21144
|
}
|
|
21145
21145
|
});
|
|
21146
|
-
console.log("simple", items);
|
|
21147
21146
|
return items;
|
|
21148
21147
|
}
|
|
21149
21148
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -21154,7 +21153,6 @@ class SimpleSpatialIndex {
|
|
|
21154
21153
|
items.push(item);
|
|
21155
21154
|
}
|
|
21156
21155
|
});
|
|
21157
|
-
console.log("simple", items);
|
|
21158
21156
|
return items;
|
|
21159
21157
|
}
|
|
21160
21158
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -21164,14 +21162,12 @@ class SimpleSpatialIndex {
|
|
|
21164
21162
|
items.push(item);
|
|
21165
21163
|
}
|
|
21166
21164
|
});
|
|
21167
|
-
console.log("simple", items);
|
|
21168
21165
|
return items;
|
|
21169
21166
|
}
|
|
21170
21167
|
getMbr() {
|
|
21171
21168
|
return this.Mbr;
|
|
21172
21169
|
}
|
|
21173
21170
|
list() {
|
|
21174
|
-
console.log("simple list", this.itemsArray.concat());
|
|
21175
21171
|
return this.itemsArray.concat();
|
|
21176
21172
|
}
|
|
21177
21173
|
getZIndex(item) {
|
|
@@ -45434,7 +45430,7 @@ class AlignmentHelper {
|
|
|
45434
45430
|
const cameraWidth = camera.getWidth();
|
|
45435
45431
|
const scale = this.board.camera.getScale();
|
|
45436
45432
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
45437
|
-
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
45433
|
+
const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
|
|
45438
45434
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
45439
45435
|
const verticalAlignments = new Map;
|
|
45440
45436
|
const horizontalAlignments = new Map;
|
|
@@ -46342,10 +46338,10 @@ class Select extends Tool {
|
|
|
46342
46338
|
if ("index" in underPointer && underPointer.index) {
|
|
46343
46339
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
46344
46340
|
const childrenIds = underPointer.getChildrenIds();
|
|
46345
|
-
|
|
46346
|
-
|
|
46347
|
-
|
|
46348
|
-
|
|
46341
|
+
console.log("UNDERPOINTER", underPointer);
|
|
46342
|
+
console.log("CHILDREN", childrenIds);
|
|
46343
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds && childrenIds.includes(item.getId()));
|
|
46344
|
+
this.board.selection.add(itemsInFrame);
|
|
46349
46345
|
}
|
|
46350
46346
|
this.board.selection.setContext("EditUnderPointer");
|
|
46351
46347
|
} else {
|
package/dist/esm/node.js
CHANGED
|
@@ -23610,7 +23610,6 @@ class SimpleSpatialIndex {
|
|
|
23610
23610
|
items.push(item);
|
|
23611
23611
|
}
|
|
23612
23612
|
});
|
|
23613
|
-
console.log("simple", items);
|
|
23614
23613
|
return items;
|
|
23615
23614
|
}
|
|
23616
23615
|
getEnclosedOrCrossed(left, top, right, bottom) {
|
|
@@ -23621,7 +23620,6 @@ class SimpleSpatialIndex {
|
|
|
23621
23620
|
items.push(item);
|
|
23622
23621
|
}
|
|
23623
23622
|
});
|
|
23624
|
-
console.log("simple", items);
|
|
23625
23623
|
return items;
|
|
23626
23624
|
}
|
|
23627
23625
|
getUnderPoint(point3, tolerace = 5) {
|
|
@@ -23631,14 +23629,12 @@ class SimpleSpatialIndex {
|
|
|
23631
23629
|
items.push(item);
|
|
23632
23630
|
}
|
|
23633
23631
|
});
|
|
23634
|
-
console.log("simple", items);
|
|
23635
23632
|
return items;
|
|
23636
23633
|
}
|
|
23637
23634
|
getMbr() {
|
|
23638
23635
|
return this.Mbr;
|
|
23639
23636
|
}
|
|
23640
23637
|
list() {
|
|
23641
|
-
console.log("simple list", this.itemsArray.concat());
|
|
23642
23638
|
return this.itemsArray.concat();
|
|
23643
23639
|
}
|
|
23644
23640
|
getZIndex(item) {
|
|
@@ -47902,7 +47898,7 @@ class AlignmentHelper {
|
|
|
47902
47898
|
const cameraWidth = camera.getWidth();
|
|
47903
47899
|
const scale = this.board.camera.getScale();
|
|
47904
47900
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
47905
|
-
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
47901
|
+
const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
|
|
47906
47902
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
47907
47903
|
const verticalAlignments = new Map;
|
|
47908
47904
|
const horizontalAlignments = new Map;
|
|
@@ -48810,10 +48806,10 @@ class Select extends Tool {
|
|
|
48810
48806
|
if ("index" in underPointer && underPointer.index) {
|
|
48811
48807
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
48812
48808
|
const childrenIds = underPointer.getChildrenIds();
|
|
48813
|
-
|
|
48814
|
-
|
|
48815
|
-
|
|
48816
|
-
|
|
48809
|
+
console.log("UNDERPOINTER", underPointer);
|
|
48810
|
+
console.log("CHILDREN", childrenIds);
|
|
48811
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds && childrenIds.includes(item.getId()));
|
|
48812
|
+
this.board.selection.add(itemsInFrame);
|
|
48817
48813
|
}
|
|
48818
48814
|
this.board.selection.setContext("EditUnderPointer");
|
|
48819
48815
|
} else {
|