Fix -> Style rework
This commit is contained in:
parent
b4ebab5d54
commit
bdbdcb5397
@ -1,7 +1,7 @@
|
|||||||
const canvas = document.getElementById("canvas");
|
const canvas = document.getElementById("canvas");
|
||||||
// Compute arrow polygon
|
// Compute arrow polygon
|
||||||
import { getArrowPolygon } from "athena-utils/shape/Arrow.js";
|
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 { getCirclePolygon } from "athena-utils/shape/BasicShapes.js";
|
||||||
import { getRectanglePolygon } from "athena-utils/shape/BasicShapes.js";
|
import { getRectanglePolygon } from "athena-utils/shape/BasicShapes.js";
|
||||||
// Polygon merge using Turf library
|
// Polygon merge using Turf library
|
||||||
@ -50,7 +50,7 @@ const arrowDataA = {
|
|||||||
offsetDistance: 50
|
offsetDistance: 50
|
||||||
};
|
};
|
||||||
const styleA = {
|
const styleA = {
|
||||||
calculation: CalculationStyle.Linear,
|
calculation: ARROW_BODY_STYLE_LINEAR,
|
||||||
range: 1,
|
range: 1,
|
||||||
minValue: 0.1
|
minValue: 0.1
|
||||||
};
|
};
|
||||||
@ -65,7 +65,7 @@ const arrowDataA = {
|
|||||||
offsetDistance: 80,
|
offsetDistance: 80,
|
||||||
};
|
};
|
||||||
const styleB = {
|
const styleB = {
|
||||||
calculation: CalculationStyle.Exponential,
|
calculation: ARROW_BODY_STYLE_EXPONENTIAL,
|
||||||
range: 5,
|
range: 5,
|
||||||
minValue: 0.1
|
minValue: 0.1
|
||||||
};
|
};
|
||||||
@ -80,7 +80,7 @@ const arrowDataA = {
|
|||||||
offsetDistance: 10,
|
offsetDistance: 10,
|
||||||
};
|
};
|
||||||
const styleC = {
|
const styleC = {
|
||||||
calculation: CalculationStyle.None,
|
calculation: ARROW_BODY_STYLE_CONSTANT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const arrowPolygonA = getArrowPolygon(arrowDataA, styleA, arrowHeadDataA);
|
const arrowPolygonA = getArrowPolygon(arrowDataA, styleA, arrowHeadDataA);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user