In MainPanel:ToggleState(): Record the panel's coords before expanding or contracting to avoid making it jump when re-setting its anchors.
James D. Callahan III [04-28-10 - 10:05]
In MainPanel:ToggleState(): Record the panel's coords before expanding or contracting to avoid making it jump when re-setting its anchors.
diff --git a/Frame.lua b/Frame.lua
index 521c329..0194f45 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -1161,6 +1161,8 @@ function MainPanel:HighlightCategory(target)
end
function MainPanel:ToggleState()
+ local x, y = self:GetLeft(), self:GetBottom()
+
if self.is_expanded then
self:SetWidth(MAINPANEL_NORMAL_WIDTH)
@@ -1180,8 +1182,6 @@ function MainPanel:ToggleState()
end
self.is_expanded = not self.is_expanded
- local x, y = self:GetLeft(), self:GetBottom()
-
self:ClearAllPoints()
self:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", x, y)
self:UpdateTitle()