Fix -> Style rework
This commit is contained in:
parent
b4ebab5d54
commit
bdbdcb5397
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user