Skip to content

Commit e747401

Browse files
committed
fix an issue that happens when the map is maximized (fixes #8)
1 parent ca1f997 commit e747401

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

NoAutoclose.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ function ns:HandleUIPanel(name, info, flippedUiSpecialFrames)
138138
end
139139
end
140140

141+
--- @param func function
142+
--- @param ... any # arguments
141143
function ns:AddToCombatLockdownQueue(func, ...)
142144
if #self.combatLockdownQueue == 0 then
143145
self.eventFrame:RegisterEvent("PLAYER_REGEN_ENABLED");
@@ -207,6 +209,11 @@ function ns:ADDON_LOADED()
207209
self:HandleUIPanel(name, info, flippedUiSpecialFrames);
208210
end
209211
if InCombatLockdown() and WorldMapFrame:IsProtected() then
212+
self:AddToCombatLockdownQueue(function()
213+
WorldMapFrame:SetAttribute('UIPanelLayout-defined', '1');
214+
WorldMapFrame:SetAttribute('UIPanelLayout-maximizePoint', 'TOP');
215+
end);
216+
else
210217
WorldMapFrame:SetAttribute('UIPanelLayout-defined', '1');
211218
WorldMapFrame:SetAttribute('UIPanelLayout-maximizePoint', 'TOP');
212219
end

0 commit comments

Comments
 (0)