From 693de26b8c2ce2ad34a74ee00a2652bcdf801df2 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sat, 12 Jun 2021 23:37:02 +0100 Subject: [PATCH] Fix outlined 2d box area update handing (Fixes #29) --- src/util/areas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/areas.ts b/src/util/areas.ts index dba7bf3..fc90495 100644 --- a/src/util/areas.ts +++ b/src/util/areas.ts @@ -43,7 +43,7 @@ export const createArea = (options: DynmapArea, converter: Function): DynmapPoly }; export const updateArea = (area: DynmapPolyline | DynmapPolygon | undefined, options: DynmapArea, converter: Function): DynmapPolyline | DynmapPolygon => { - const outline = (options.style && options.style.fillOpacity && (options.style.fillOpacity <= 0)) as boolean, + const outline = !options.style || !options.style.fillOpacity || (options.style.fillOpacity <= 0) as boolean, points = getPoints(options, converter, outline); if (!area) { @@ -225,4 +225,4 @@ export const get2DShapePoints = (options: DynmapArea, converter: Function, outli } return points; -} \ No newline at end of file +}