microboard-temp 0.13.56 → 0.13.58

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.
@@ -13031,8 +13031,9 @@ var init_BaseItem = __esm(() => {
13031
13031
  _physicsHalfExtent = -1;
13032
13032
  get physicsHalfExtent() {
13033
13033
  if (this._physicsHalfExtent < 0) {
13034
- const w = Math.max(this.right - this.left, 1);
13035
- const h = Math.max(this.bottom - this.top, 1);
13034
+ const mbr = this.getMbr();
13035
+ const w = Math.max(mbr.getWidth(), 1);
13036
+ const h = Math.max(mbr.getHeight(), 1);
13036
13037
  this._physicsHalfExtent = Math.max(w, h) * 0.5;
13037
13038
  }
13038
13039
  return this._physicsHalfExtent;
@@ -13243,7 +13244,7 @@ var init_BaseItem = __esm(() => {
13243
13244
  this.subject.publish(this);
13244
13245
  }
13245
13246
  updateMbr() {
13246
- this._physicsHalfExtent = -1;
13247
+ return;
13247
13248
  }
13248
13249
  getLinkTo() {
13249
13250
  return this.linkTo.link;
@@ -13354,16 +13355,6 @@ var init_BaseItem = __esm(() => {
13354
13355
  }
13355
13356
  }
13356
13357
  this.transformation.apply(transformOp);
13357
- const m = transformOp.method;
13358
- if (m !== "translateTo" && m !== "translateBy" && m !== "rotateTo" && m !== "rotateBy" && m !== "locked" && m !== "unlocked") {
13359
- if (m === "applyMatrix") {
13360
- if (transformOp.items.some((i) => i.matrix.scaleX !== 1 || i.matrix.scaleY !== 1)) {
13361
- this._physicsHalfExtent = -1;
13362
- }
13363
- } else {
13364
- this._physicsHalfExtent = -1;
13365
- }
13366
- }
13367
13358
  break;
13368
13359
  }
13369
13360
  case "LinkTo":
@@ -60923,8 +60914,9 @@ class ForceGraphEngine {
60923
60914
  if (!activeIds.has(item.getId()))
60924
60915
  continue;
60925
60916
  const pos = item.transformation.getTranslation();
60926
- const w = Math.max(item.right - item.left, 1);
60927
- const h2 = Math.max(item.bottom - item.top, 1);
60917
+ const mbr = item.getMbr();
60918
+ const w = Math.max(mbr.getWidth(), 1);
60919
+ const h2 = Math.max(mbr.getHeight(), 1);
60928
60920
  snapMap.set(item.getId(), { id: item.getId(), cx: pos.x + w * 0.5, cy: pos.y + h2 * 0.5, w, h: h2 });
60929
60921
  }
60930
60922
  const snap = Array.from(snapMap.values());
package/dist/cjs/index.js CHANGED
@@ -13031,8 +13031,9 @@ var init_BaseItem = __esm(() => {
13031
13031
  _physicsHalfExtent = -1;
13032
13032
  get physicsHalfExtent() {
13033
13033
  if (this._physicsHalfExtent < 0) {
13034
- const w = Math.max(this.right - this.left, 1);
13035
- const h = Math.max(this.bottom - this.top, 1);
13034
+ const mbr = this.getMbr();
13035
+ const w = Math.max(mbr.getWidth(), 1);
13036
+ const h = Math.max(mbr.getHeight(), 1);
13036
13037
  this._physicsHalfExtent = Math.max(w, h) * 0.5;
13037
13038
  }
13038
13039
  return this._physicsHalfExtent;
@@ -13243,7 +13244,7 @@ var init_BaseItem = __esm(() => {
13243
13244
  this.subject.publish(this);
13244
13245
  }
13245
13246
  updateMbr() {
13246
- this._physicsHalfExtent = -1;
13247
+ return;
13247
13248
  }
13248
13249
  getLinkTo() {
13249
13250
  return this.linkTo.link;
@@ -13354,16 +13355,6 @@ var init_BaseItem = __esm(() => {
13354
13355
  }
13355
13356
  }
13356
13357
  this.transformation.apply(transformOp);
13357
- const m = transformOp.method;
13358
- if (m !== "translateTo" && m !== "translateBy" && m !== "rotateTo" && m !== "rotateBy" && m !== "locked" && m !== "unlocked") {
13359
- if (m === "applyMatrix") {
13360
- if (transformOp.items.some((i) => i.matrix.scaleX !== 1 || i.matrix.scaleY !== 1)) {
13361
- this._physicsHalfExtent = -1;
13362
- }
13363
- } else {
13364
- this._physicsHalfExtent = -1;
13365
- }
13366
- }
13367
13358
  break;
13368
13359
  }
13369
13360
  case "LinkTo":
@@ -60923,8 +60914,9 @@ class ForceGraphEngine {
60923
60914
  if (!activeIds.has(item.getId()))
60924
60915
  continue;
60925
60916
  const pos = item.transformation.getTranslation();
60926
- const w = Math.max(item.right - item.left, 1);
60927
- const h2 = Math.max(item.bottom - item.top, 1);
60917
+ const mbr = item.getMbr();
60918
+ const w = Math.max(mbr.getWidth(), 1);
60919
+ const h2 = Math.max(mbr.getHeight(), 1);
60928
60920
  snapMap.set(item.getId(), { id: item.getId(), cx: pos.x + w * 0.5, cy: pos.y + h2 * 0.5, w, h: h2 });
60929
60921
  }
60930
60922
  const snap = Array.from(snapMap.values());
package/dist/cjs/node.js CHANGED
@@ -13051,8 +13051,9 @@ var init_BaseItem = __esm(() => {
13051
13051
  _physicsHalfExtent = -1;
13052
13052
  get physicsHalfExtent() {
13053
13053
  if (this._physicsHalfExtent < 0) {
13054
- const w = Math.max(this.right - this.left, 1);
13055
- const h = Math.max(this.bottom - this.top, 1);
13054
+ const mbr = this.getMbr();
13055
+ const w = Math.max(mbr.getWidth(), 1);
13056
+ const h = Math.max(mbr.getHeight(), 1);
13056
13057
  this._physicsHalfExtent = Math.max(w, h) * 0.5;
13057
13058
  }
13058
13059
  return this._physicsHalfExtent;
@@ -13263,7 +13264,7 @@ var init_BaseItem = __esm(() => {
13263
13264
  this.subject.publish(this);
13264
13265
  }
13265
13266
  updateMbr() {
13266
- this._physicsHalfExtent = -1;
13267
+ return;
13267
13268
  }
13268
13269
  getLinkTo() {
13269
13270
  return this.linkTo.link;
@@ -13374,16 +13375,6 @@ var init_BaseItem = __esm(() => {
13374
13375
  }
13375
13376
  }
13376
13377
  this.transformation.apply(transformOp);
13377
- const m = transformOp.method;
13378
- if (m !== "translateTo" && m !== "translateBy" && m !== "rotateTo" && m !== "rotateBy" && m !== "locked" && m !== "unlocked") {
13379
- if (m === "applyMatrix") {
13380
- if (transformOp.items.some((i) => i.matrix.scaleX !== 1 || i.matrix.scaleY !== 1)) {
13381
- this._physicsHalfExtent = -1;
13382
- }
13383
- } else {
13384
- this._physicsHalfExtent = -1;
13385
- }
13386
- }
13387
13378
  break;
13388
13379
  }
13389
13380
  case "LinkTo":
@@ -63398,8 +63389,9 @@ class ForceGraphEngine {
63398
63389
  if (!activeIds.has(item.getId()))
63399
63390
  continue;
63400
63391
  const pos = item.transformation.getTranslation();
63401
- const w = Math.max(item.right - item.left, 1);
63402
- const h2 = Math.max(item.bottom - item.top, 1);
63392
+ const mbr = item.getMbr();
63393
+ const w = Math.max(mbr.getWidth(), 1);
63394
+ const h2 = Math.max(mbr.getHeight(), 1);
63403
63395
  snapMap.set(item.getId(), { id: item.getId(), cx: pos.x + w * 0.5, cy: pos.y + h2 * 0.5, w, h: h2 });
63404
63396
  }
63405
63397
  const snap = Array.from(snapMap.values());
@@ -13003,8 +13003,9 @@ var init_BaseItem = __esm(() => {
13003
13003
  _physicsHalfExtent = -1;
13004
13004
  get physicsHalfExtent() {
13005
13005
  if (this._physicsHalfExtent < 0) {
13006
- const w = Math.max(this.right - this.left, 1);
13007
- const h = Math.max(this.bottom - this.top, 1);
13006
+ const mbr = this.getMbr();
13007
+ const w = Math.max(mbr.getWidth(), 1);
13008
+ const h = Math.max(mbr.getHeight(), 1);
13008
13009
  this._physicsHalfExtent = Math.max(w, h) * 0.5;
13009
13010
  }
13010
13011
  return this._physicsHalfExtent;
@@ -13215,7 +13216,7 @@ var init_BaseItem = __esm(() => {
13215
13216
  this.subject.publish(this);
13216
13217
  }
13217
13218
  updateMbr() {
13218
- this._physicsHalfExtent = -1;
13219
+ return;
13219
13220
  }
13220
13221
  getLinkTo() {
13221
13222
  return this.linkTo.link;
@@ -13326,16 +13327,6 @@ var init_BaseItem = __esm(() => {
13326
13327
  }
13327
13328
  }
13328
13329
  this.transformation.apply(transformOp);
13329
- const m = transformOp.method;
13330
- if (m !== "translateTo" && m !== "translateBy" && m !== "rotateTo" && m !== "rotateBy" && m !== "locked" && m !== "unlocked") {
13331
- if (m === "applyMatrix") {
13332
- if (transformOp.items.some((i) => i.matrix.scaleX !== 1 || i.matrix.scaleY !== 1)) {
13333
- this._physicsHalfExtent = -1;
13334
- }
13335
- } else {
13336
- this._physicsHalfExtent = -1;
13337
- }
13338
- }
13339
13330
  break;
13340
13331
  }
13341
13332
  case "LinkTo":
@@ -60666,8 +60657,9 @@ class ForceGraphEngine {
60666
60657
  if (!activeIds.has(item.getId()))
60667
60658
  continue;
60668
60659
  const pos = item.transformation.getTranslation();
60669
- const w = Math.max(item.right - item.left, 1);
60670
- const h2 = Math.max(item.bottom - item.top, 1);
60660
+ const mbr = item.getMbr();
60661
+ const w = Math.max(mbr.getWidth(), 1);
60662
+ const h2 = Math.max(mbr.getHeight(), 1);
60671
60663
  snapMap.set(item.getId(), { id: item.getId(), cx: pos.x + w * 0.5, cy: pos.y + h2 * 0.5, w, h: h2 });
60672
60664
  }
60673
60665
  const snap = Array.from(snapMap.values());
package/dist/esm/index.js CHANGED
@@ -12996,8 +12996,9 @@ var init_BaseItem = __esm(() => {
12996
12996
  _physicsHalfExtent = -1;
12997
12997
  get physicsHalfExtent() {
12998
12998
  if (this._physicsHalfExtent < 0) {
12999
- const w = Math.max(this.right - this.left, 1);
13000
- const h = Math.max(this.bottom - this.top, 1);
12999
+ const mbr = this.getMbr();
13000
+ const w = Math.max(mbr.getWidth(), 1);
13001
+ const h = Math.max(mbr.getHeight(), 1);
13001
13002
  this._physicsHalfExtent = Math.max(w, h) * 0.5;
13002
13003
  }
13003
13004
  return this._physicsHalfExtent;
@@ -13208,7 +13209,7 @@ var init_BaseItem = __esm(() => {
13208
13209
  this.subject.publish(this);
13209
13210
  }
13210
13211
  updateMbr() {
13211
- this._physicsHalfExtent = -1;
13212
+ return;
13212
13213
  }
13213
13214
  getLinkTo() {
13214
13215
  return this.linkTo.link;
@@ -13319,16 +13320,6 @@ var init_BaseItem = __esm(() => {
13319
13320
  }
13320
13321
  }
13321
13322
  this.transformation.apply(transformOp);
13322
- const m = transformOp.method;
13323
- if (m !== "translateTo" && m !== "translateBy" && m !== "rotateTo" && m !== "rotateBy" && m !== "locked" && m !== "unlocked") {
13324
- if (m === "applyMatrix") {
13325
- if (transformOp.items.some((i) => i.matrix.scaleX !== 1 || i.matrix.scaleY !== 1)) {
13326
- this._physicsHalfExtent = -1;
13327
- }
13328
- } else {
13329
- this._physicsHalfExtent = -1;
13330
- }
13331
- }
13332
13323
  break;
13333
13324
  }
13334
13325
  case "LinkTo":
@@ -60659,8 +60650,9 @@ class ForceGraphEngine {
60659
60650
  if (!activeIds.has(item.getId()))
60660
60651
  continue;
60661
60652
  const pos = item.transformation.getTranslation();
60662
- const w = Math.max(item.right - item.left, 1);
60663
- const h2 = Math.max(item.bottom - item.top, 1);
60653
+ const mbr = item.getMbr();
60654
+ const w = Math.max(mbr.getWidth(), 1);
60655
+ const h2 = Math.max(mbr.getHeight(), 1);
60664
60656
  snapMap.set(item.getId(), { id: item.getId(), cx: pos.x + w * 0.5, cy: pos.y + h2 * 0.5, w, h: h2 });
60665
60657
  }
60666
60658
  const snap = Array.from(snapMap.values());
package/dist/esm/node.js CHANGED
@@ -13018,8 +13018,9 @@ var init_BaseItem = __esm(() => {
13018
13018
  _physicsHalfExtent = -1;
13019
13019
  get physicsHalfExtent() {
13020
13020
  if (this._physicsHalfExtent < 0) {
13021
- const w = Math.max(this.right - this.left, 1);
13022
- const h = Math.max(this.bottom - this.top, 1);
13021
+ const mbr = this.getMbr();
13022
+ const w = Math.max(mbr.getWidth(), 1);
13023
+ const h = Math.max(mbr.getHeight(), 1);
13023
13024
  this._physicsHalfExtent = Math.max(w, h) * 0.5;
13024
13025
  }
13025
13026
  return this._physicsHalfExtent;
@@ -13230,7 +13231,7 @@ var init_BaseItem = __esm(() => {
13230
13231
  this.subject.publish(this);
13231
13232
  }
13232
13233
  updateMbr() {
13233
- this._physicsHalfExtent = -1;
13234
+ return;
13234
13235
  }
13235
13236
  getLinkTo() {
13236
13237
  return this.linkTo.link;
@@ -13341,16 +13342,6 @@ var init_BaseItem = __esm(() => {
13341
13342
  }
13342
13343
  }
13343
13344
  this.transformation.apply(transformOp);
13344
- const m = transformOp.method;
13345
- if (m !== "translateTo" && m !== "translateBy" && m !== "rotateTo" && m !== "rotateBy" && m !== "locked" && m !== "unlocked") {
13346
- if (m === "applyMatrix") {
13347
- if (transformOp.items.some((i) => i.matrix.scaleX !== 1 || i.matrix.scaleY !== 1)) {
13348
- this._physicsHalfExtent = -1;
13349
- }
13350
- } else {
13351
- this._physicsHalfExtent = -1;
13352
- }
13353
- }
13354
13345
  break;
13355
13346
  }
13356
13347
  case "LinkTo":
@@ -63123,8 +63114,9 @@ class ForceGraphEngine {
63123
63114
  if (!activeIds.has(item.getId()))
63124
63115
  continue;
63125
63116
  const pos = item.transformation.getTranslation();
63126
- const w = Math.max(item.right - item.left, 1);
63127
- const h2 = Math.max(item.bottom - item.top, 1);
63117
+ const mbr = item.getMbr();
63118
+ const w = Math.max(mbr.getWidth(), 1);
63119
+ const h2 = Math.max(mbr.getHeight(), 1);
63128
63120
  snapMap.set(item.getId(), { id: item.getId(), cx: pos.x + w * 0.5, cy: pos.y + h2 * 0.5, w, h: h2 });
63129
63121
  }
63130
63122
  const snap = Array.from(snapMap.values());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.13.56",
3
+ "version": "0.13.58",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",