microboard-temp 0.5.150 → 0.5.151

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.
@@ -20853,11 +20853,8 @@ class SpatialIndex {
20853
20853
  }
20854
20854
  change = (item) => {
20855
20855
  this.itemsIndex.change(item);
20856
- if (this.Mbr.getWidth() === 0 && this.Mbr.getHeight() === 0) {
20857
- this.Mbr = item.getMbrWithChildren().copy();
20858
- } else {
20859
- this.Mbr.combine([item.getMbrWithChildren()]);
20860
- }
20856
+ this.Mbr = new Mbr;
20857
+ this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
20861
20858
  this.subject.publish(this.items);
20862
20859
  };
20863
20860
  remove(item) {
package/dist/cjs/index.js CHANGED
@@ -20853,11 +20853,8 @@ class SpatialIndex {
20853
20853
  }
20854
20854
  change = (item) => {
20855
20855
  this.itemsIndex.change(item);
20856
- if (this.Mbr.getWidth() === 0 && this.Mbr.getHeight() === 0) {
20857
- this.Mbr = item.getMbrWithChildren().copy();
20858
- } else {
20859
- this.Mbr.combine([item.getMbrWithChildren()]);
20860
- }
20856
+ this.Mbr = new Mbr;
20857
+ this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
20861
20858
  this.subject.publish(this.items);
20862
20859
  };
20863
20860
  remove(item) {
package/dist/cjs/node.js CHANGED
@@ -23325,11 +23325,8 @@ class SpatialIndex {
23325
23325
  }
23326
23326
  change = (item) => {
23327
23327
  this.itemsIndex.change(item);
23328
- if (this.Mbr.getWidth() === 0 && this.Mbr.getHeight() === 0) {
23329
- this.Mbr = item.getMbrWithChildren().copy();
23330
- } else {
23331
- this.Mbr.combine([item.getMbrWithChildren()]);
23332
- }
23328
+ this.Mbr = new Mbr;
23329
+ this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
23333
23330
  this.subject.publish(this.items);
23334
23331
  };
23335
23332
  remove(item) {
@@ -20696,11 +20696,8 @@ class SpatialIndex {
20696
20696
  }
20697
20697
  change = (item) => {
20698
20698
  this.itemsIndex.change(item);
20699
- if (this.Mbr.getWidth() === 0 && this.Mbr.getHeight() === 0) {
20700
- this.Mbr = item.getMbrWithChildren().copy();
20701
- } else {
20702
- this.Mbr.combine([item.getMbrWithChildren()]);
20703
- }
20699
+ this.Mbr = new Mbr;
20700
+ this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
20704
20701
  this.subject.publish(this.items);
20705
20702
  };
20706
20703
  remove(item) {
package/dist/esm/index.js CHANGED
@@ -20689,11 +20689,8 @@ class SpatialIndex {
20689
20689
  }
20690
20690
  change = (item) => {
20691
20691
  this.itemsIndex.change(item);
20692
- if (this.Mbr.getWidth() === 0 && this.Mbr.getHeight() === 0) {
20693
- this.Mbr = item.getMbrWithChildren().copy();
20694
- } else {
20695
- this.Mbr.combine([item.getMbrWithChildren()]);
20696
- }
20692
+ this.Mbr = new Mbr;
20693
+ this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
20697
20694
  this.subject.publish(this.items);
20698
20695
  };
20699
20696
  remove(item) {
package/dist/esm/node.js CHANGED
@@ -23156,11 +23156,8 @@ class SpatialIndex {
23156
23156
  }
23157
23157
  change = (item) => {
23158
23158
  this.itemsIndex.change(item);
23159
- if (this.Mbr.getWidth() === 0 && this.Mbr.getHeight() === 0) {
23160
- this.Mbr = item.getMbrWithChildren().copy();
23161
- } else {
23162
- this.Mbr.combine([item.getMbrWithChildren()]);
23163
- }
23159
+ this.Mbr = new Mbr;
23160
+ this.itemsArray.forEach((i) => this.Mbr.combine([i.getMbrWithChildren()]));
23164
23161
  this.subject.publish(this.items);
23165
23162
  };
23166
23163
  remove(item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.5.150",
3
+ "version": "0.5.151",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",