diff --git a/ArrowPoints.js b/ArrowPoints.js index 3694fd6..d123fe6 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 88df30d..d8fedb9 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#10ab405d5e", + "resolved": "git+https://git.projectathena.ca/andyaxxe/athena-utils.git#904b62b360", "dev": true, "dependencies": { "@turf/turf": "7.2.0"