fix(map): minimap range cutoff no longer clips visible icons (#17)

The cutoff hid icons beyond its yard value before checking the minimap's
visible radius, so the default 100 hid icons that were clearly on the
minimap (view radius is 133-466 yd by zoom). Now it only clips icons
outside the visible circle: HBD's pin renderer gates the cutoff on
dist > 1, and QuestieMap FadeLogic raises the effective cutoff to at
least the current minimap view radius via new HBDPins:GetMinimapRadius().
This commit is contained in:
Xurkon
2026-06-10 19:24:39 -05:00
parent ff08c38fa0
commit 1c0a891efd
3 changed files with 27 additions and 2 deletions
+14 -1
View File
@@ -468,9 +468,15 @@ local function drawMinimapPin(pin, data)
-- data.floatOnEdge is replaced by (data.floatOnEdge and ((pin.texture and pin.texture.a and pin.texture.a ~= 0) or pin.texture == nil))
-- icons will now only float on edge if they have an opacity which is not 0 or if no texture exist.
data.distanceFromMinimapCenter = dist
-- Minimap range cutoff: only clamp icons that fall OUTSIDE the minimap's visible
-- radius (dist > 1, i.e. edge-floating icons). Icons that are actually within the
-- visible minimap circle must always show, otherwise the cutoff hides quest icons
-- that are clearly on the minimap whenever its view radius (133-466 yd depending on
-- zoom) exceeds the cutoff yard value — the regression reported in #17. The cutoff
-- then only limits how far edge-floating icons reach for far-apart objectives.
local minimapVisibilityCutoff = pin.minimapVisibilityCutoff
or (Questie and Questie.db and Questie.db.profile and Questie.db.profile.minimapIconRangeCutoff)
if minimapVisibilityCutoff and lastXY and lastYY and data.x and data.y then
if dist > 1 and minimapVisibilityCutoff and lastXY and lastYY and data.x and data.y then
local xd, yd = lastXY - data.x, lastYY - data.y
local distance = (xd * xd + yd * yd)^0.5
if distance > minimapVisibilityCutoff then
@@ -727,6 +733,13 @@ function pins:RefreshMinimap()
UpdateMinimapIconPosition()
end
-- Returns the minimap's current visible radius in yards (last value computed by
-- UpdateMinimapPins). Used by Questie's minimap FadeLogic so the range cutoff only
-- clips icons that are genuinely OUTSIDE the visible minimap, never icons within it.
function pins:GetMinimapRadius()
return mapRadius
end
function pins:SetMinimapVisibilityCutoff(cutoff)
for pin, data in pairs(minimapPins) do
pin.minimapVisibilityCutoff = cutoff