fix(map): remove redundant scale-mismatched icon cull on world map

The manual overflow cull in HandleWorldMapPin compared icon:GetCenter()
against WorldMapScrollFrame's bounds without normalizing effective scale.
Magnify's zoom drags the icon's effective scale via WorldMapDetailFrame,
while the scroll frame's stays constant, so at high zoom ratios the
comparison failed for every icon and hid the whole map. Native
WorldMapScrollFrame:SetScrollChild() clipping (now reachable on all 4
edges since SetDrawOrder correctly detects bundled Magnify) already
handles this without the buggy manual math.
This commit is contained in:
2026-07-15 17:34:38 +02:00
parent 8089b5f08c
commit b4e0894c3f
+10 -20
View File
@@ -879,26 +879,16 @@ local function HandleWorldMapPin(icon, data)
icon:SetPoint("CENTER", WorldMapButton, "TOPLEFT", (x * worldmapWidth) / iconEffScale, -(y * worldmapHeight) / iconEffScale) icon:SetPoint("CENTER", WorldMapButton, "TOPLEFT", (x * worldmapWidth) / iconEffScale, -(y * worldmapHeight) / iconEffScale)
icon:Show() icon:Show()
-- Questie fix: when zoomed in (e.g. via Magnify/LootCollector), WorldMapButton is -- Manual GetLeft/Right/Top/Bottom-vs-GetCenter overflow culling used to live here
-- drawn far larger than the visible window and only WorldMapScrollFrame clips it. -- (Questie fix for Magnify/LootCollector zoom). Removed: it compared Get*() values
-- Pins positioned past the visible edge still render on top of the surrounding UI -- across frames with different effective scales (icon's scale is dragged around by
-- instead of being clipped, so hide them manually once they're outside the -- Magnify's WorldMapDetailFrame:SetScale() zoom, WorldMapScrollFrame's isn't), which
-- scroll frame's actual on-screen bounds. GetLeft/Right/Top/Bottom/Center are all -- are only directly comparable at equal effective scale -- at high zoom ratios the
-- in a shared scale-independent coordinate space, so no extra scale math needed. -- mismatch made the check fail for every icon, hiding the entire map. Icons are
-- Only do this when the map is actually drawn larger than its viewport (the zoom -- already parented inside WorldMapButton, itself inside Magnify's real
-- case) -- at normal size (e.g. just the "show objective" panel active, no zoom) -- WorldMapScrollFrame:SetScrollChild() subtree once SetDrawOrder correctly detects
-- the whole map already fits on-screen, so this check should never fire there; -- Magnify (see Modules/Map/QuestieMapUtils.lua), so the engine's native scroll-child
-- skip it entirely rather than risk false positives hiding valid icons. -- clip now handles this on all 4 edges, during pan, with no Lua-side math needed.
if WorldMapScrollFrame and WorldMapScrollFrame:IsVisible() then
local scrollWidth, scrollHeight = WorldMapScrollFrame:GetWidth(), WorldMapScrollFrame:GetHeight()
if scrollWidth and scrollHeight and (worldmapWidth > scrollWidth + 1 or worldmapHeight > scrollHeight + 1) then
local iconCenterX, iconCenterY = icon:GetCenter()
local vLeft, vRight, vTop, vBottom = WorldMapScrollFrame:GetLeft(), WorldMapScrollFrame:GetRight(), WorldMapScrollFrame:GetTop(), WorldMapScrollFrame:GetBottom()
if iconCenterX and vLeft and (iconCenterX < vLeft or iconCenterX > vRight or iconCenterY > vTop or iconCenterY < vBottom) then
icon:Hide()
end
end
end
else else
icon:Hide() icon:Hide()
end end