microboard-temp 0.5.84 → 0.5.85

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.
@@ -36953,16 +36953,14 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
36953
36953
  }
36954
36954
  const dx = endPoint.x - startPoint.x;
36955
36955
  const dy = endPoint.y - startPoint.y;
36956
- if (startDir === "right" && dx < 0) {
36956
+ const startConflictX = startDir === "right" && dx < 0 || startDir === "left" && dx > 0;
36957
+ const startConflictY = startDir === "bottom" && dy < 0 || startDir === "top" && dy > 0;
36958
+ const endConflictX = endDir === "right" && dx > 0 || endDir === "left" && dx < 0;
36959
+ const endConflictY = endDir === "bottom" && dy > 0 || endDir === "top" && dy < 0;
36960
+ if (startConflictX || endConflictY) {
36957
36961
  return [new Point(startPoint.x, endPoint.y)];
36958
36962
  }
36959
- if (startDir === "left" && dx > 0) {
36960
- return [new Point(startPoint.x, endPoint.y)];
36961
- }
36962
- if (startDir === "bottom" && dy < 0) {
36963
- return [new Point(endPoint.x, startPoint.y)];
36964
- }
36965
- if (startDir === "top" && dy > 0) {
36963
+ if (startConflictY || endConflictX) {
36966
36964
  return [new Point(endPoint.x, startPoint.y)];
36967
36965
  }
36968
36966
  return [];
package/dist/cjs/index.js CHANGED
@@ -36953,16 +36953,14 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
36953
36953
  }
36954
36954
  const dx = endPoint.x - startPoint.x;
36955
36955
  const dy = endPoint.y - startPoint.y;
36956
- if (startDir === "right" && dx < 0) {
36956
+ const startConflictX = startDir === "right" && dx < 0 || startDir === "left" && dx > 0;
36957
+ const startConflictY = startDir === "bottom" && dy < 0 || startDir === "top" && dy > 0;
36958
+ const endConflictX = endDir === "right" && dx > 0 || endDir === "left" && dx < 0;
36959
+ const endConflictY = endDir === "bottom" && dy > 0 || endDir === "top" && dy < 0;
36960
+ if (startConflictX || endConflictY) {
36957
36961
  return [new Point(startPoint.x, endPoint.y)];
36958
36962
  }
36959
- if (startDir === "left" && dx > 0) {
36960
- return [new Point(startPoint.x, endPoint.y)];
36961
- }
36962
- if (startDir === "bottom" && dy < 0) {
36963
- return [new Point(endPoint.x, startPoint.y)];
36964
- }
36965
- if (startDir === "top" && dy > 0) {
36963
+ if (startConflictY || endConflictX) {
36966
36964
  return [new Point(endPoint.x, startPoint.y)];
36967
36965
  }
36968
36966
  return [];
package/dist/cjs/node.js CHANGED
@@ -39426,16 +39426,14 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
39426
39426
  }
39427
39427
  const dx = endPoint.x - startPoint.x;
39428
39428
  const dy = endPoint.y - startPoint.y;
39429
- if (startDir === "right" && dx < 0) {
39429
+ const startConflictX = startDir === "right" && dx < 0 || startDir === "left" && dx > 0;
39430
+ const startConflictY = startDir === "bottom" && dy < 0 || startDir === "top" && dy > 0;
39431
+ const endConflictX = endDir === "right" && dx > 0 || endDir === "left" && dx < 0;
39432
+ const endConflictY = endDir === "bottom" && dy > 0 || endDir === "top" && dy < 0;
39433
+ if (startConflictX || endConflictY) {
39430
39434
  return [new Point(startPoint.x, endPoint.y)];
39431
39435
  }
39432
- if (startDir === "left" && dx > 0) {
39433
- return [new Point(startPoint.x, endPoint.y)];
39434
- }
39435
- if (startDir === "bottom" && dy < 0) {
39436
- return [new Point(endPoint.x, startPoint.y)];
39437
- }
39438
- if (startDir === "top" && dy > 0) {
39436
+ if (startConflictY || endConflictX) {
39439
39437
  return [new Point(endPoint.x, startPoint.y)];
39440
39438
  }
39441
39439
  return [];
@@ -36798,16 +36798,14 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
36798
36798
  }
36799
36799
  const dx = endPoint.x - startPoint.x;
36800
36800
  const dy = endPoint.y - startPoint.y;
36801
- if (startDir === "right" && dx < 0) {
36801
+ const startConflictX = startDir === "right" && dx < 0 || startDir === "left" && dx > 0;
36802
+ const startConflictY = startDir === "bottom" && dy < 0 || startDir === "top" && dy > 0;
36803
+ const endConflictX = endDir === "right" && dx > 0 || endDir === "left" && dx < 0;
36804
+ const endConflictY = endDir === "bottom" && dy > 0 || endDir === "top" && dy < 0;
36805
+ if (startConflictX || endConflictY) {
36802
36806
  return [new Point(startPoint.x, endPoint.y)];
36803
36807
  }
36804
- if (startDir === "left" && dx > 0) {
36805
- return [new Point(startPoint.x, endPoint.y)];
36806
- }
36807
- if (startDir === "bottom" && dy < 0) {
36808
- return [new Point(endPoint.x, startPoint.y)];
36809
- }
36810
- if (startDir === "top" && dy > 0) {
36808
+ if (startConflictY || endConflictX) {
36811
36809
  return [new Point(endPoint.x, startPoint.y)];
36812
36810
  }
36813
36811
  return [];
package/dist/esm/index.js CHANGED
@@ -36791,16 +36791,14 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
36791
36791
  }
36792
36792
  const dx = endPoint.x - startPoint.x;
36793
36793
  const dy = endPoint.y - startPoint.y;
36794
- if (startDir === "right" && dx < 0) {
36794
+ const startConflictX = startDir === "right" && dx < 0 || startDir === "left" && dx > 0;
36795
+ const startConflictY = startDir === "bottom" && dy < 0 || startDir === "top" && dy > 0;
36796
+ const endConflictX = endDir === "right" && dx > 0 || endDir === "left" && dx < 0;
36797
+ const endConflictY = endDir === "bottom" && dy > 0 || endDir === "top" && dy < 0;
36798
+ if (startConflictX || endConflictY) {
36795
36799
  return [new Point(startPoint.x, endPoint.y)];
36796
36800
  }
36797
- if (startDir === "left" && dx > 0) {
36798
- return [new Point(startPoint.x, endPoint.y)];
36799
- }
36800
- if (startDir === "bottom" && dy < 0) {
36801
- return [new Point(endPoint.x, startPoint.y)];
36802
- }
36803
- if (startDir === "top" && dy > 0) {
36801
+ if (startConflictY || endConflictX) {
36804
36802
  return [new Point(endPoint.x, startPoint.y)];
36805
36803
  }
36806
36804
  return [];
package/dist/esm/node.js CHANGED
@@ -39259,16 +39259,14 @@ function createHookWaypoints(startPoint, endPoint, startDir, endDir) {
39259
39259
  }
39260
39260
  const dx = endPoint.x - startPoint.x;
39261
39261
  const dy = endPoint.y - startPoint.y;
39262
- if (startDir === "right" && dx < 0) {
39262
+ const startConflictX = startDir === "right" && dx < 0 || startDir === "left" && dx > 0;
39263
+ const startConflictY = startDir === "bottom" && dy < 0 || startDir === "top" && dy > 0;
39264
+ const endConflictX = endDir === "right" && dx > 0 || endDir === "left" && dx < 0;
39265
+ const endConflictY = endDir === "bottom" && dy > 0 || endDir === "top" && dy < 0;
39266
+ if (startConflictX || endConflictY) {
39263
39267
  return [new Point(startPoint.x, endPoint.y)];
39264
39268
  }
39265
- if (startDir === "left" && dx > 0) {
39266
- return [new Point(startPoint.x, endPoint.y)];
39267
- }
39268
- if (startDir === "bottom" && dy < 0) {
39269
- return [new Point(endPoint.x, startPoint.y)];
39270
- }
39271
- if (startDir === "top" && dy > 0) {
39269
+ if (startConflictY || endConflictX) {
39272
39270
  return [new Point(endPoint.x, startPoint.y)];
39273
39271
  }
39274
39272
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.5.84",
3
+ "version": "0.5.85",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",