microboard-temp 0.14.4 → 0.14.6

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.
@@ -58114,13 +58114,19 @@ var init_findOrthogonalPath = __esm(() => {
58114
58114
  });
58115
58115
 
58116
58116
  // src/Items/Connector/getLine/getOrthogonalLine.ts
58117
+ function getItemWorldMbr(item) {
58118
+ if (item instanceof BaseItem && item.parent !== "Board") {
58119
+ return item.getWorldMbr();
58120
+ }
58121
+ return item.getMbr();
58122
+ }
58117
58123
  function getOrthogonalLine(start, end, middle, skipObstacles = false) {
58118
58124
  const obstacles = [];
58119
58125
  if (start.pointType !== "Board" && !skipObstacles) {
58120
- obstacles.push(start.item.getMbr());
58126
+ obstacles.push(getItemWorldMbr(start.item));
58121
58127
  }
58122
58128
  if (end.pointType !== "Board" && !skipObstacles) {
58123
- obstacles.push(end.item.getMbr());
58129
+ obstacles.push(getItemWorldMbr(end.item));
58124
58130
  }
58125
58131
  const { lines, newStart, newEnd } = findOrthogonalPath(start, end, obstacles, middle ? [middle] : undefined);
58126
58132
  if (lines.length === 0) {
@@ -58134,6 +58140,7 @@ function getOrthogonalLine(start, end, middle, skipObstacles = false) {
58134
58140
  var init_getOrthogonalLine = __esm(() => {
58135
58141
  init_Items();
58136
58142
  init_findOrthogonalPath();
58143
+ init_BaseItem();
58137
58144
  });
58138
58145
 
58139
58146
  // src/Items/Connector/getLine/getStraightLine.ts
@@ -59062,12 +59069,8 @@ var init_Connector = __esm(() => {
59062
59069
  }
59063
59070
  if (data.transformation) {
59064
59071
  this.transformation.deserialize(data.transformation);
59065
- this.translatePoints();
59066
- this.updatePaths();
59067
- } else {
59068
- this.translatePoints();
59069
- this.updatePaths();
59070
59072
  }
59073
+ this.updatePaths();
59071
59074
  this.subject.publish(this);
59072
59075
  return this;
59073
59076
  }
package/dist/cjs/index.js CHANGED
@@ -58114,13 +58114,19 @@ var init_findOrthogonalPath = __esm(() => {
58114
58114
  });
58115
58115
 
58116
58116
  // src/Items/Connector/getLine/getOrthogonalLine.ts
58117
+ function getItemWorldMbr(item) {
58118
+ if (item instanceof BaseItem && item.parent !== "Board") {
58119
+ return item.getWorldMbr();
58120
+ }
58121
+ return item.getMbr();
58122
+ }
58117
58123
  function getOrthogonalLine(start, end, middle, skipObstacles = false) {
58118
58124
  const obstacles = [];
58119
58125
  if (start.pointType !== "Board" && !skipObstacles) {
58120
- obstacles.push(start.item.getMbr());
58126
+ obstacles.push(getItemWorldMbr(start.item));
58121
58127
  }
58122
58128
  if (end.pointType !== "Board" && !skipObstacles) {
58123
- obstacles.push(end.item.getMbr());
58129
+ obstacles.push(getItemWorldMbr(end.item));
58124
58130
  }
58125
58131
  const { lines, newStart, newEnd } = findOrthogonalPath(start, end, obstacles, middle ? [middle] : undefined);
58126
58132
  if (lines.length === 0) {
@@ -58134,6 +58140,7 @@ function getOrthogonalLine(start, end, middle, skipObstacles = false) {
58134
58140
  var init_getOrthogonalLine = __esm(() => {
58135
58141
  init_Items();
58136
58142
  init_findOrthogonalPath();
58143
+ init_BaseItem();
58137
58144
  });
58138
58145
 
58139
58146
  // src/Items/Connector/getLine/getStraightLine.ts
@@ -59062,12 +59069,8 @@ var init_Connector = __esm(() => {
59062
59069
  }
59063
59070
  if (data.transformation) {
59064
59071
  this.transformation.deserialize(data.transformation);
59065
- this.translatePoints();
59066
- this.updatePaths();
59067
- } else {
59068
- this.translatePoints();
59069
- this.updatePaths();
59070
59072
  }
59073
+ this.updatePaths();
59071
59074
  this.subject.publish(this);
59072
59075
  return this;
59073
59076
  }
package/dist/cjs/node.js CHANGED
@@ -60534,13 +60534,19 @@ var init_findOrthogonalPath = __esm(() => {
60534
60534
  });
60535
60535
 
60536
60536
  // src/Items/Connector/getLine/getOrthogonalLine.ts
60537
+ function getItemWorldMbr(item) {
60538
+ if (item instanceof BaseItem && item.parent !== "Board") {
60539
+ return item.getWorldMbr();
60540
+ }
60541
+ return item.getMbr();
60542
+ }
60537
60543
  function getOrthogonalLine(start, end, middle, skipObstacles = false) {
60538
60544
  const obstacles = [];
60539
60545
  if (start.pointType !== "Board" && !skipObstacles) {
60540
- obstacles.push(start.item.getMbr());
60546
+ obstacles.push(getItemWorldMbr(start.item));
60541
60547
  }
60542
60548
  if (end.pointType !== "Board" && !skipObstacles) {
60543
- obstacles.push(end.item.getMbr());
60549
+ obstacles.push(getItemWorldMbr(end.item));
60544
60550
  }
60545
60551
  const { lines, newStart, newEnd } = findOrthogonalPath(start, end, obstacles, middle ? [middle] : undefined);
60546
60552
  if (lines.length === 0) {
@@ -60554,6 +60560,7 @@ function getOrthogonalLine(start, end, middle, skipObstacles = false) {
60554
60560
  var init_getOrthogonalLine = __esm(() => {
60555
60561
  init_Items();
60556
60562
  init_findOrthogonalPath();
60563
+ init_BaseItem();
60557
60564
  });
60558
60565
 
60559
60566
  // src/Items/Connector/getLine/getStraightLine.ts
@@ -61482,12 +61489,8 @@ var init_Connector = __esm(() => {
61482
61489
  }
61483
61490
  if (data.transformation) {
61484
61491
  this.transformation.deserialize(data.transformation);
61485
- this.translatePoints();
61486
- this.updatePaths();
61487
- } else {
61488
- this.translatePoints();
61489
- this.updatePaths();
61490
61492
  }
61493
+ this.updatePaths();
61491
61494
  this.subject.publish(this);
61492
61495
  return this;
61493
61496
  }
@@ -58051,13 +58051,19 @@ var init_findOrthogonalPath = __esm(() => {
58051
58051
  });
58052
58052
 
58053
58053
  // src/Items/Connector/getLine/getOrthogonalLine.ts
58054
+ function getItemWorldMbr(item) {
58055
+ if (item instanceof BaseItem && item.parent !== "Board") {
58056
+ return item.getWorldMbr();
58057
+ }
58058
+ return item.getMbr();
58059
+ }
58054
58060
  function getOrthogonalLine(start, end, middle, skipObstacles = false) {
58055
58061
  const obstacles = [];
58056
58062
  if (start.pointType !== "Board" && !skipObstacles) {
58057
- obstacles.push(start.item.getMbr());
58063
+ obstacles.push(getItemWorldMbr(start.item));
58058
58064
  }
58059
58065
  if (end.pointType !== "Board" && !skipObstacles) {
58060
- obstacles.push(end.item.getMbr());
58066
+ obstacles.push(getItemWorldMbr(end.item));
58061
58067
  }
58062
58068
  const { lines, newStart, newEnd } = findOrthogonalPath(start, end, obstacles, middle ? [middle] : undefined);
58063
58069
  if (lines.length === 0) {
@@ -58071,6 +58077,7 @@ function getOrthogonalLine(start, end, middle, skipObstacles = false) {
58071
58077
  var init_getOrthogonalLine = __esm(() => {
58072
58078
  init_Items();
58073
58079
  init_findOrthogonalPath();
58080
+ init_BaseItem();
58074
58081
  });
58075
58082
 
58076
58083
  // src/Items/Connector/getLine/getStraightLine.ts
@@ -58999,12 +59006,8 @@ var init_Connector = __esm(() => {
58999
59006
  }
59000
59007
  if (data.transformation) {
59001
59008
  this.transformation.deserialize(data.transformation);
59002
- this.translatePoints();
59003
- this.updatePaths();
59004
- } else {
59005
- this.translatePoints();
59006
- this.updatePaths();
59007
59009
  }
59010
+ this.updatePaths();
59008
59011
  this.subject.publish(this);
59009
59012
  return this;
59010
59013
  }
package/dist/esm/index.js CHANGED
@@ -58044,13 +58044,19 @@ var init_findOrthogonalPath = __esm(() => {
58044
58044
  });
58045
58045
 
58046
58046
  // src/Items/Connector/getLine/getOrthogonalLine.ts
58047
+ function getItemWorldMbr(item) {
58048
+ if (item instanceof BaseItem && item.parent !== "Board") {
58049
+ return item.getWorldMbr();
58050
+ }
58051
+ return item.getMbr();
58052
+ }
58047
58053
  function getOrthogonalLine(start, end, middle, skipObstacles = false) {
58048
58054
  const obstacles = [];
58049
58055
  if (start.pointType !== "Board" && !skipObstacles) {
58050
- obstacles.push(start.item.getMbr());
58056
+ obstacles.push(getItemWorldMbr(start.item));
58051
58057
  }
58052
58058
  if (end.pointType !== "Board" && !skipObstacles) {
58053
- obstacles.push(end.item.getMbr());
58059
+ obstacles.push(getItemWorldMbr(end.item));
58054
58060
  }
58055
58061
  const { lines, newStart, newEnd } = findOrthogonalPath(start, end, obstacles, middle ? [middle] : undefined);
58056
58062
  if (lines.length === 0) {
@@ -58064,6 +58070,7 @@ function getOrthogonalLine(start, end, middle, skipObstacles = false) {
58064
58070
  var init_getOrthogonalLine = __esm(() => {
58065
58071
  init_Items();
58066
58072
  init_findOrthogonalPath();
58073
+ init_BaseItem();
58067
58074
  });
58068
58075
 
58069
58076
  // src/Items/Connector/getLine/getStraightLine.ts
@@ -58992,12 +58999,8 @@ var init_Connector = __esm(() => {
58992
58999
  }
58993
59000
  if (data.transformation) {
58994
59001
  this.transformation.deserialize(data.transformation);
58995
- this.translatePoints();
58996
- this.updatePaths();
58997
- } else {
58998
- this.translatePoints();
58999
- this.updatePaths();
59000
59002
  }
59003
+ this.updatePaths();
59001
59004
  this.subject.publish(this);
59002
59005
  return this;
59003
59006
  }
package/dist/esm/node.js CHANGED
@@ -60453,13 +60453,19 @@ var init_findOrthogonalPath = __esm(() => {
60453
60453
  });
60454
60454
 
60455
60455
  // src/Items/Connector/getLine/getOrthogonalLine.ts
60456
+ function getItemWorldMbr(item) {
60457
+ if (item instanceof BaseItem && item.parent !== "Board") {
60458
+ return item.getWorldMbr();
60459
+ }
60460
+ return item.getMbr();
60461
+ }
60456
60462
  function getOrthogonalLine(start, end, middle, skipObstacles = false) {
60457
60463
  const obstacles = [];
60458
60464
  if (start.pointType !== "Board" && !skipObstacles) {
60459
- obstacles.push(start.item.getMbr());
60465
+ obstacles.push(getItemWorldMbr(start.item));
60460
60466
  }
60461
60467
  if (end.pointType !== "Board" && !skipObstacles) {
60462
- obstacles.push(end.item.getMbr());
60468
+ obstacles.push(getItemWorldMbr(end.item));
60463
60469
  }
60464
60470
  const { lines, newStart, newEnd } = findOrthogonalPath(start, end, obstacles, middle ? [middle] : undefined);
60465
60471
  if (lines.length === 0) {
@@ -60473,6 +60479,7 @@ function getOrthogonalLine(start, end, middle, skipObstacles = false) {
60473
60479
  var init_getOrthogonalLine = __esm(() => {
60474
60480
  init_Items();
60475
60481
  init_findOrthogonalPath();
60482
+ init_BaseItem();
60476
60483
  });
60477
60484
 
60478
60485
  // src/Items/Connector/getLine/getStraightLine.ts
@@ -61401,12 +61408,8 @@ var init_Connector = __esm(() => {
61401
61408
  }
61402
61409
  if (data.transformation) {
61403
61410
  this.transformation.deserialize(data.transformation);
61404
- this.translatePoints();
61405
- this.updatePaths();
61406
- } else {
61407
- this.translatePoints();
61408
- this.updatePaths();
61409
61411
  }
61412
+ this.updatePaths();
61410
61413
  this.subject.publish(this);
61411
61414
  return this;
61412
61415
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.14.4",
3
+ "version": "0.14.6",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",