From 5012dddbd687c28a2edb4d123b87749b37d945d2 Mon Sep 17 00:00:00 2001 From: Tomas Richtar Date: Thu, 29 May 2025 18:00:46 +0200 Subject: [PATCH] PR fixes --- ArrowPoints.js | 44 +++++++++++++++++++++++++------------------- package-lock.json | 2 +- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/ArrowPoints.js b/ArrowPoints.js index a291333..d590b6b 100644 --- a/ArrowPoints.js +++ b/ArrowPoints.js @@ -73,37 +73,46 @@ const frontlineDataA = { splineStep: 0.08, spacing: 10, offsetDistance: 10, - protrusionLength: 15, - protrusionStartSize: 5, - protrusionEndSize: 2, - protrusionGap: 20, style: LEFT_SIDE, }; +const protrusionDataA = { + length: 15, + startSize: 5, + endSize: 2, + gap: 20, + }; + const frontlineDataB = { points: frontlinePointsB, splineStep: 0.02, spacing: 10, offsetDistance: 10, - protrusionLength: 15, - protrusionStartSize: 5, - protrusionEndSize: 5, - protrusionGap: 20, style: RIGHT_SIDE, }; + const protrusionDataB = { + length: 15, + startSize: 5, + endSize: 5, + gap: 20, + }; + const frontlineDataC = { points: frontlinePointsC, splineStep: 0.02, spacing: 10, offsetDistance: 10, - protrusionLength: 15, - protrusionStartSize: 5, - protrusionEndSize: 0, - protrusionGap: 20, style: BOTH_SIDES, }; + const protrusionDataC = { + length: 15, + startSize: 5, + endSize: 5, + gap: 20, + }; + const arrowDataA = { points: pointsA, splineStep: 0.02, @@ -163,20 +172,17 @@ const rectanglePoly = getRectanglePolygon(circleCenter, rectangleSideA, rectangl const rectangleToTurfPoly = toTurfPolygon(rectanglePoly); const frontlinePolygonA = getFrontline(frontlineDataA); -let frontlinePolygonMergedA = mergeTurfPolygons(frontlinePolygonA.body,frontlinePolygonA.protrusions[0]); -for (let i = 1; i < frontlinePolygonA.protrusions.length; i++) -{ - frontlinePolygonMergedA = addTurfPolygonToMerge(frontlinePolygonMergedA, frontlinePolygonA.protrusions[i]); -} +let frontlinePolygonMergedA = toTurfPolygon(frontlinePolygonA.body); -const frontlinePolygonB = getFrontline(frontlineDataB); + +const frontlinePolygonB = getFrontline(frontlineDataB, protrusionDataB); let frontlinePolygonMergedB = mergeTurfPolygons(frontlinePolygonB.body,frontlinePolygonB.protrusions[0]); for (let i = 1; i < frontlinePolygonB.protrusions.length; i++) { frontlinePolygonMergedB = addTurfPolygonToMerge(frontlinePolygonMergedB, frontlinePolygonB.protrusions[i]); } -const frontlinePolygonC = getFrontline(frontlineDataC); +const frontlinePolygonC = getFrontline(frontlineDataC, protrusionDataC); let frontlinePolygonMergedLeft = mergeTurfPolygons(frontlinePolygonC.bodyLeft, frontlinePolygonC.protrusionsLeft[0]); for (let i = 1; i < frontlinePolygonC.protrusionsLeft.length; i++) { diff --git a/package-lock.json b/package-lock.json index 62812b1..9d6aa67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2718,7 +2718,7 @@ "dev": true }, "node_modules/athena-utils": { - "resolved": "git+https://git.projectathena.ca/andyaxxe/athena-utils.git#03f16f45f2", + "resolved": "git+https://git.projectathena.ca/andyaxxe/athena-utils.git#d21133ef0f", "dev": true, "dependencies": { "@turf/turf": "7.2.0"