orcasvn-react-diagrams 0.1.41 → 0.1.42

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.
package/dist/cjs/index.js CHANGED
@@ -7525,6 +7525,8 @@ var getIntersectionPositions = function (pointStart, pointEnd, ele) {
7525
7525
  };
7526
7526
  //Find the first intersection point of the line starting from startPosition to endPosition on the elements
7527
7527
  var getFirstIntersection = function (startPosition, endPosition, elements) {
7528
+ if (!endPosition)
7529
+ return undefined;
7528
7530
  var result;
7529
7531
  for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
7530
7532
  var element = elements_1[_i];
@@ -9059,6 +9061,12 @@ var automationAddPointsToLink = function (eleLink, elements, limitPoint) {
9059
9061
  var nearestIntersection = firstIntersection.nearestIntersection; firstIntersection.intersectionPointsList; var intersectedElement = firstIntersection.element;
9060
9062
  //Calculate to create a replacement point
9061
9063
  var replacementPosition = generateSubstitutePosition(nearestIntersection, targetPosition, intersectedElement);
9064
+ if (!replacementPosition) {
9065
+ replacementPosition = {
9066
+ x: nearestIntersection.x,
9067
+ y: nearestIntersection.y
9068
+ };
9069
+ }
9062
9070
  //Increases the number of points found by 1
9063
9071
  numberOfPoints += 1;
9064
9072
  //Create points with the starting point being the sourcePosition and the ending point being the newly created point
package/dist/esm/index.js CHANGED
@@ -7521,6 +7521,8 @@ var getIntersectionPositions = function (pointStart, pointEnd, ele) {
7521
7521
  };
7522
7522
  //Find the first intersection point of the line starting from startPosition to endPosition on the elements
7523
7523
  var getFirstIntersection = function (startPosition, endPosition, elements) {
7524
+ if (!endPosition)
7525
+ return undefined;
7524
7526
  var result;
7525
7527
  for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
7526
7528
  var element = elements_1[_i];
@@ -9055,6 +9057,12 @@ var automationAddPointsToLink = function (eleLink, elements, limitPoint) {
9055
9057
  var nearestIntersection = firstIntersection.nearestIntersection; firstIntersection.intersectionPointsList; var intersectedElement = firstIntersection.element;
9056
9058
  //Calculate to create a replacement point
9057
9059
  var replacementPosition = generateSubstitutePosition(nearestIntersection, targetPosition, intersectedElement);
9060
+ if (!replacementPosition) {
9061
+ replacementPosition = {
9062
+ x: nearestIntersection.x,
9063
+ y: nearestIntersection.y
9064
+ };
9065
+ }
9058
9066
  //Increases the number of points found by 1
9059
9067
  numberOfPoints += 1;
9060
9068
  //Create points with the starting point being the sourcePosition and the ending point being the newly created point