microboard-temp 0.4.48 → 0.4.50

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.
@@ -20747,10 +20747,6 @@ class SpatialIndex {
20747
20747
  if ("index" in item && item.index) {
20748
20748
  item.removeChildItems(item.index.list());
20749
20749
  }
20750
- if (item.parent !== "Board") {
20751
- const parentFrame = this.items.getById(item.parent);
20752
- parentFrame?.removeChildItems(item);
20753
- }
20754
20750
  this.itemsArray.splice(this.itemsArray.indexOf(item), 1);
20755
20751
  this.itemsIndex.remove(item);
20756
20752
  this.Mbr = new Mbr;
@@ -45587,7 +45583,7 @@ class AlignmentHelper {
45587
45583
  const cameraWidth = camera.getWidth();
45588
45584
  const scale = this.board.camera.getScale();
45589
45585
  const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
45590
- const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
45586
+ const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
45591
45587
  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);
45592
45588
  const verticalAlignments = new Map;
45593
45589
  const horizontalAlignments = new Map;
package/dist/cjs/index.js CHANGED
@@ -20747,10 +20747,6 @@ class SpatialIndex {
20747
20747
  if ("index" in item && item.index) {
20748
20748
  item.removeChildItems(item.index.list());
20749
20749
  }
20750
- if (item.parent !== "Board") {
20751
- const parentFrame = this.items.getById(item.parent);
20752
- parentFrame?.removeChildItems(item);
20753
- }
20754
20750
  this.itemsArray.splice(this.itemsArray.indexOf(item), 1);
20755
20751
  this.itemsIndex.remove(item);
20756
20752
  this.Mbr = new Mbr;
@@ -45587,7 +45583,7 @@ class AlignmentHelper {
45587
45583
  const cameraWidth = camera.getWidth();
45588
45584
  const scale = this.board.camera.getScale();
45589
45585
  const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
45590
- const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
45586
+ const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
45591
45587
  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);
45592
45588
  const verticalAlignments = new Map;
45593
45589
  const horizontalAlignments = new Map;
package/dist/cjs/node.js CHANGED
@@ -23219,10 +23219,6 @@ class SpatialIndex {
23219
23219
  if ("index" in item && item.index) {
23220
23220
  item.removeChildItems(item.index.list());
23221
23221
  }
23222
- if (item.parent !== "Board") {
23223
- const parentFrame = this.items.getById(item.parent);
23224
- parentFrame?.removeChildItems(item);
23225
- }
23226
23222
  this.itemsArray.splice(this.itemsArray.indexOf(item), 1);
23227
23223
  this.itemsIndex.remove(item);
23228
23224
  this.Mbr = new Mbr;
@@ -48060,7 +48056,7 @@ class AlignmentHelper {
48060
48056
  const cameraWidth = camera.getWidth();
48061
48057
  const scale = this.board.camera.getScale();
48062
48058
  const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
48063
- const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
48059
+ const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
48064
48060
  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);
48065
48061
  const verticalAlignments = new Map;
48066
48062
  const horizontalAlignments = new Map;
@@ -20597,10 +20597,6 @@ class SpatialIndex {
20597
20597
  if ("index" in item && item.index) {
20598
20598
  item.removeChildItems(item.index.list());
20599
20599
  }
20600
- if (item.parent !== "Board") {
20601
- const parentFrame = this.items.getById(item.parent);
20602
- parentFrame?.removeChildItems(item);
20603
- }
20604
20600
  this.itemsArray.splice(this.itemsArray.indexOf(item), 1);
20605
20601
  this.itemsIndex.remove(item);
20606
20602
  this.Mbr = new Mbr;
@@ -45437,7 +45433,7 @@ class AlignmentHelper {
45437
45433
  const cameraWidth = camera.getWidth();
45438
45434
  const scale = this.board.camera.getScale();
45439
45435
  const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
45440
- const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
45436
+ const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
45441
45437
  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);
45442
45438
  const verticalAlignments = new Map;
45443
45439
  const horizontalAlignments = new Map;
package/dist/esm/index.js CHANGED
@@ -20590,10 +20590,6 @@ class SpatialIndex {
20590
20590
  if ("index" in item && item.index) {
20591
20591
  item.removeChildItems(item.index.list());
20592
20592
  }
20593
- if (item.parent !== "Board") {
20594
- const parentFrame = this.items.getById(item.parent);
20595
- parentFrame?.removeChildItems(item);
20596
- }
20597
20593
  this.itemsArray.splice(this.itemsArray.indexOf(item), 1);
20598
20594
  this.itemsIndex.remove(item);
20599
20595
  this.Mbr = new Mbr;
@@ -45430,7 +45426,7 @@ class AlignmentHelper {
45430
45426
  const cameraWidth = camera.getWidth();
45431
45427
  const scale = this.board.camera.getScale();
45432
45428
  const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
45433
- const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
45429
+ const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
45434
45430
  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);
45435
45431
  const verticalAlignments = new Map;
45436
45432
  const horizontalAlignments = new Map;
package/dist/esm/node.js CHANGED
@@ -23057,10 +23057,6 @@ class SpatialIndex {
23057
23057
  if ("index" in item && item.index) {
23058
23058
  item.removeChildItems(item.index.list());
23059
23059
  }
23060
- if (item.parent !== "Board") {
23061
- const parentFrame = this.items.getById(item.parent);
23062
- parentFrame?.removeChildItems(item);
23063
- }
23064
23060
  this.itemsArray.splice(this.itemsArray.indexOf(item), 1);
23065
23061
  this.itemsIndex.remove(item);
23066
23062
  this.Mbr = new Mbr;
@@ -47898,7 +47894,7 @@ class AlignmentHelper {
47898
47894
  const cameraWidth = camera.getWidth();
47899
47895
  const scale = this.board.camera.getScale();
47900
47896
  const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
47901
- const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
47897
+ const childrenIds = "index" in movingItem && movingItem.index ? movingItem.getChildrenIds() : [];
47902
47898
  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);
47903
47899
  const verticalAlignments = new Map;
47904
47900
  const horizontalAlignments = new Map;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.48",
3
+ "version": "0.4.50",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",