fix(map): keep world-map icons inside Magnify's native scroll clip
SetDrawOrder only recognized a standalone "Magnify-WotLK" addon, but this setup bundles Magnify inside LootCollector (no separate .toc), so the check always failed and every icon got reparented onto WorldMapFrame -- outside WorldMapScrollFrame's clipped subtree -- and strata-forced to WorldMapFrame instead of WorldMapButton, regardless of HBD's earlier correct parenting. Detect the bundled Magnify via the _G.LootCollectorMagnify global and match WorldMapButton's strata instead, mirroring LootCollector's own pins. Fixes icon culling on all 4 edges during both zoom and pan, in normal and objective-panel map modes.
This commit is contained in:
@@ -47,13 +47,20 @@ function QuestieMap.utils:SetDrawOrder(frame)
|
||||
frame:SetFrameStrata(frameStrata)
|
||||
frame:SetFrameLevel(frameLevel)
|
||||
else
|
||||
-- If Magnify-WotLK is loaded, parent to WorldMapButton instead of WorldMapFrame
|
||||
-- If Magnify is loaded (standalone Magnify-WotLK, or bundled inside LootCollector,
|
||||
-- which has no separate .toc so IsAddOnLoaded("Magnify-WotLK") never sees it),
|
||||
-- parent to WorldMapButton and match ITS strata instead of WorldMapFrame's, so the
|
||||
-- icon stays inside Magnify's native WorldMapScrollFrame clip subtree (mirrors how
|
||||
-- LootCollector's own map pins are parented/strata'd in Modules/Map.lua)
|
||||
local magnifyLoaded = (IsAddOnLoaded and IsAddOnLoaded("Magnify-WotLK")) or (_G.LootCollectorMagnify ~= nil)
|
||||
local parent = WorldMapFrame
|
||||
if IsAddOnLoaded and IsAddOnLoaded("Magnify-WotLK") and _G.WorldMapButton then
|
||||
local strataSource = WorldMapFrame
|
||||
if magnifyLoaded and _G.WorldMapButton then
|
||||
parent = WorldMapButton
|
||||
strataSource = WorldMapButton
|
||||
end
|
||||
local frameLevel = WorldMapFrame:GetFrameLevel() + 7
|
||||
local frameStrata = WorldMapFrame:GetFrameStrata()
|
||||
local frameStrata = strataSource:GetFrameStrata()
|
||||
frame:SetParent(parent)
|
||||
frame:SetFrameStrata(frameStrata)
|
||||
frame:SetFrameLevel(frameLevel)
|
||||
|
||||
Reference in New Issue
Block a user