Fix outlined 2d box area update handing (Fixes #29)

This commit is contained in:
James Lyne 2021-06-12 23:37:02 +01:00
parent ce80666949
commit 693de26b8c

View File

@ -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;
}
}