From bd3de44a7632cc4b93ea3b8986c34b566882374e Mon Sep 17 00:00:00 2001 From: pvdstel Date: Thu, 21 Oct 2021 15:00:25 +0200 Subject: [PATCH] Fix marker position rendering in compass mode --- overwolf/src/Minimap.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/overwolf/src/Minimap.tsx b/overwolf/src/Minimap.tsx index 55b3b35a..12fa4bdd 100644 --- a/overwolf/src/Minimap.tsx +++ b/overwolf/src/Minimap.tsx @@ -208,9 +208,11 @@ export default function Minimap(props: IProps) { continue; } - const mapPos = renderAsCompass - ? playerPos - : toMinimapCoordinate(mapCenterPos, marker.pos, ctx.canvas.width * zoomLevel, ctx.canvas.height * zoomLevel); + const mapPos = toMinimapCoordinate( + renderAsCompass ? playerPos : mapCenterPos, + marker.pos, + ctx.canvas.width * zoomLevel, + ctx.canvas.height * zoomLevel); const icon = mapIconsCache.getIcon(marker.type, marker.category); if (!icon) { continue; } const imgPosCorrected = {