microboard-temp 0.5.73 → 0.5.74

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.
@@ -36774,8 +36774,17 @@ function createGrid(start, end, toVisitPoints = []) {
36774
36774
  const mbrFloored = new Mbr(Math.floor(itemMbr.left), Math.floor(itemMbr.top), Math.floor(itemMbr.right), Math.floor(itemMbr.bottom));
36775
36775
  const pointOnMbr = mbrFloored.getLines()[revertMapDir[dir2]].getNearestPointOnLineSegment(point5);
36776
36776
  const newPoint = Object.create(Object.getPrototypeOf(point5), Object.getOwnPropertyDescriptors(point5));
36777
- newPoint.x = pointOnMbr.x + offsetMap[dir2].x;
36778
- newPoint.y = pointOnMbr.y + offsetMap[dir2].y;
36777
+ newPoint.x = pointOnMbr.x;
36778
+ newPoint.y = pointOnMbr.y;
36779
+ if (dir2 === "top") {
36780
+ newPoint.y -= ITEM_OFFSET;
36781
+ } else if (dir2 === "bottom") {
36782
+ newPoint.y += ITEM_OFFSET;
36783
+ } else if (dir2 === "left") {
36784
+ newPoint.x -= ITEM_OFFSET;
36785
+ } else if (dir2 === "right") {
36786
+ newPoint.x += ITEM_OFFSET;
36787
+ }
36779
36788
  verticalLines.push(mbrFloored.left - ITEM_OFFSET, mbrFloored.left, pointOnMbr.x, mbrFloored.right, mbrFloored.right + ITEM_OFFSET);
36780
36789
  horizontalLines.push(mbrFloored.top - ITEM_OFFSET, mbrFloored.top, pointOnMbr.y, mbrFloored.bottom, mbrFloored.bottom + ITEM_OFFSET);
36781
36790
  return newPoint;
package/dist/cjs/index.js CHANGED
@@ -36774,8 +36774,17 @@ function createGrid(start, end, toVisitPoints = []) {
36774
36774
  const mbrFloored = new Mbr(Math.floor(itemMbr.left), Math.floor(itemMbr.top), Math.floor(itemMbr.right), Math.floor(itemMbr.bottom));
36775
36775
  const pointOnMbr = mbrFloored.getLines()[revertMapDir[dir2]].getNearestPointOnLineSegment(point5);
36776
36776
  const newPoint = Object.create(Object.getPrototypeOf(point5), Object.getOwnPropertyDescriptors(point5));
36777
- newPoint.x = pointOnMbr.x + offsetMap[dir2].x;
36778
- newPoint.y = pointOnMbr.y + offsetMap[dir2].y;
36777
+ newPoint.x = pointOnMbr.x;
36778
+ newPoint.y = pointOnMbr.y;
36779
+ if (dir2 === "top") {
36780
+ newPoint.y -= ITEM_OFFSET;
36781
+ } else if (dir2 === "bottom") {
36782
+ newPoint.y += ITEM_OFFSET;
36783
+ } else if (dir2 === "left") {
36784
+ newPoint.x -= ITEM_OFFSET;
36785
+ } else if (dir2 === "right") {
36786
+ newPoint.x += ITEM_OFFSET;
36787
+ }
36779
36788
  verticalLines.push(mbrFloored.left - ITEM_OFFSET, mbrFloored.left, pointOnMbr.x, mbrFloored.right, mbrFloored.right + ITEM_OFFSET);
36780
36789
  horizontalLines.push(mbrFloored.top - ITEM_OFFSET, mbrFloored.top, pointOnMbr.y, mbrFloored.bottom, mbrFloored.bottom + ITEM_OFFSET);
36781
36790
  return newPoint;
package/dist/cjs/node.js CHANGED
@@ -39247,8 +39247,17 @@ function createGrid(start, end, toVisitPoints = []) {
39247
39247
  const mbrFloored = new Mbr(Math.floor(itemMbr.left), Math.floor(itemMbr.top), Math.floor(itemMbr.right), Math.floor(itemMbr.bottom));
39248
39248
  const pointOnMbr = mbrFloored.getLines()[revertMapDir[dir2]].getNearestPointOnLineSegment(point5);
39249
39249
  const newPoint = Object.create(Object.getPrototypeOf(point5), Object.getOwnPropertyDescriptors(point5));
39250
- newPoint.x = pointOnMbr.x + offsetMap[dir2].x;
39251
- newPoint.y = pointOnMbr.y + offsetMap[dir2].y;
39250
+ newPoint.x = pointOnMbr.x;
39251
+ newPoint.y = pointOnMbr.y;
39252
+ if (dir2 === "top") {
39253
+ newPoint.y -= ITEM_OFFSET;
39254
+ } else if (dir2 === "bottom") {
39255
+ newPoint.y += ITEM_OFFSET;
39256
+ } else if (dir2 === "left") {
39257
+ newPoint.x -= ITEM_OFFSET;
39258
+ } else if (dir2 === "right") {
39259
+ newPoint.x += ITEM_OFFSET;
39260
+ }
39252
39261
  verticalLines.push(mbrFloored.left - ITEM_OFFSET, mbrFloored.left, pointOnMbr.x, mbrFloored.right, mbrFloored.right + ITEM_OFFSET);
39253
39262
  horizontalLines.push(mbrFloored.top - ITEM_OFFSET, mbrFloored.top, pointOnMbr.y, mbrFloored.bottom, mbrFloored.bottom + ITEM_OFFSET);
39254
39263
  return newPoint;
@@ -36619,8 +36619,17 @@ function createGrid(start, end, toVisitPoints = []) {
36619
36619
  const mbrFloored = new Mbr(Math.floor(itemMbr.left), Math.floor(itemMbr.top), Math.floor(itemMbr.right), Math.floor(itemMbr.bottom));
36620
36620
  const pointOnMbr = mbrFloored.getLines()[revertMapDir[dir2]].getNearestPointOnLineSegment(point5);
36621
36621
  const newPoint = Object.create(Object.getPrototypeOf(point5), Object.getOwnPropertyDescriptors(point5));
36622
- newPoint.x = pointOnMbr.x + offsetMap[dir2].x;
36623
- newPoint.y = pointOnMbr.y + offsetMap[dir2].y;
36622
+ newPoint.x = pointOnMbr.x;
36623
+ newPoint.y = pointOnMbr.y;
36624
+ if (dir2 === "top") {
36625
+ newPoint.y -= ITEM_OFFSET;
36626
+ } else if (dir2 === "bottom") {
36627
+ newPoint.y += ITEM_OFFSET;
36628
+ } else if (dir2 === "left") {
36629
+ newPoint.x -= ITEM_OFFSET;
36630
+ } else if (dir2 === "right") {
36631
+ newPoint.x += ITEM_OFFSET;
36632
+ }
36624
36633
  verticalLines.push(mbrFloored.left - ITEM_OFFSET, mbrFloored.left, pointOnMbr.x, mbrFloored.right, mbrFloored.right + ITEM_OFFSET);
36625
36634
  horizontalLines.push(mbrFloored.top - ITEM_OFFSET, mbrFloored.top, pointOnMbr.y, mbrFloored.bottom, mbrFloored.bottom + ITEM_OFFSET);
36626
36635
  return newPoint;
package/dist/esm/index.js CHANGED
@@ -36612,8 +36612,17 @@ function createGrid(start, end, toVisitPoints = []) {
36612
36612
  const mbrFloored = new Mbr(Math.floor(itemMbr.left), Math.floor(itemMbr.top), Math.floor(itemMbr.right), Math.floor(itemMbr.bottom));
36613
36613
  const pointOnMbr = mbrFloored.getLines()[revertMapDir[dir2]].getNearestPointOnLineSegment(point5);
36614
36614
  const newPoint = Object.create(Object.getPrototypeOf(point5), Object.getOwnPropertyDescriptors(point5));
36615
- newPoint.x = pointOnMbr.x + offsetMap[dir2].x;
36616
- newPoint.y = pointOnMbr.y + offsetMap[dir2].y;
36615
+ newPoint.x = pointOnMbr.x;
36616
+ newPoint.y = pointOnMbr.y;
36617
+ if (dir2 === "top") {
36618
+ newPoint.y -= ITEM_OFFSET;
36619
+ } else if (dir2 === "bottom") {
36620
+ newPoint.y += ITEM_OFFSET;
36621
+ } else if (dir2 === "left") {
36622
+ newPoint.x -= ITEM_OFFSET;
36623
+ } else if (dir2 === "right") {
36624
+ newPoint.x += ITEM_OFFSET;
36625
+ }
36617
36626
  verticalLines.push(mbrFloored.left - ITEM_OFFSET, mbrFloored.left, pointOnMbr.x, mbrFloored.right, mbrFloored.right + ITEM_OFFSET);
36618
36627
  horizontalLines.push(mbrFloored.top - ITEM_OFFSET, mbrFloored.top, pointOnMbr.y, mbrFloored.bottom, mbrFloored.bottom + ITEM_OFFSET);
36619
36628
  return newPoint;
package/dist/esm/node.js CHANGED
@@ -39080,8 +39080,17 @@ function createGrid(start, end, toVisitPoints = []) {
39080
39080
  const mbrFloored = new Mbr(Math.floor(itemMbr.left), Math.floor(itemMbr.top), Math.floor(itemMbr.right), Math.floor(itemMbr.bottom));
39081
39081
  const pointOnMbr = mbrFloored.getLines()[revertMapDir[dir2]].getNearestPointOnLineSegment(point5);
39082
39082
  const newPoint = Object.create(Object.getPrototypeOf(point5), Object.getOwnPropertyDescriptors(point5));
39083
- newPoint.x = pointOnMbr.x + offsetMap[dir2].x;
39084
- newPoint.y = pointOnMbr.y + offsetMap[dir2].y;
39083
+ newPoint.x = pointOnMbr.x;
39084
+ newPoint.y = pointOnMbr.y;
39085
+ if (dir2 === "top") {
39086
+ newPoint.y -= ITEM_OFFSET;
39087
+ } else if (dir2 === "bottom") {
39088
+ newPoint.y += ITEM_OFFSET;
39089
+ } else if (dir2 === "left") {
39090
+ newPoint.x -= ITEM_OFFSET;
39091
+ } else if (dir2 === "right") {
39092
+ newPoint.x += ITEM_OFFSET;
39093
+ }
39085
39094
  verticalLines.push(mbrFloored.left - ITEM_OFFSET, mbrFloored.left, pointOnMbr.x, mbrFloored.right, mbrFloored.right + ITEM_OFFSET);
39086
39095
  horizontalLines.push(mbrFloored.top - ITEM_OFFSET, mbrFloored.top, pointOnMbr.y, mbrFloored.bottom, mbrFloored.bottom + ITEM_OFFSET);
39087
39096
  return newPoint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.5.73",
3
+ "version": "0.5.74",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",