From bdbdcb53973bba347eb19d5cac7d485d0a026cf7 Mon Sep 17 00:00:00 2001 From: Tomas Richtar Date: Fri, 9 May 2025 16:24:58 +0200 Subject: [PATCH] Fix -> Style rework --- ArrowPoints.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArrowPoints.js b/ArrowPoints.js index 89aa10b..2698a07 100644 --- a/ArrowPoints.js +++ b/ArrowPoints.js @@ -1,7 +1,7 @@ const canvas = document.getElementById("canvas"); // Compute arrow polygon import { getArrowPolygon } from "athena-utils/shape/Arrow.js"; -import { CalculationStyle } from "athena-utils/shape/Arrow.js"; +import { ARROW_BODY_STYLE_CONSTANT, ARROW_BODY_STYLE_LINEAR, ARROW_BODY_STYLE_EXPONENTIAL } from "athena-utils/shape/Arrow.js"; import { getCirclePolygon } from "athena-utils/shape/BasicShapes.js"; import { getRectanglePolygon } from "athena-utils/shape/BasicShapes.js"; // Polygon merge using Turf library @@ -50,7 +50,7 @@ const arrowDataA = { offsetDistance: 50 }; const styleA = { - calculation: CalculationStyle.Linear, + calculation: ARROW_BODY_STYLE_LINEAR, range: 1, minValue: 0.1 }; @@ -65,7 +65,7 @@ const arrowDataA = { offsetDistance: 80, }; const styleB = { - calculation: CalculationStyle.Exponential, + calculation: ARROW_BODY_STYLE_EXPONENTIAL, range: 5, minValue: 0.1 }; @@ -80,7 +80,7 @@ const arrowDataA = { offsetDistance: 10, }; const styleC = { - calculation: CalculationStyle.None, + calculation: ARROW_BODY_STYLE_CONSTANT, }; const arrowPolygonA = getArrowPolygon(arrowDataA, styleA, arrowHeadDataA);