map: restore scale and position when shown

Set the scale to previous or 0.85 because the game default
scripts set it to fullscreen scale each time. Additionaly,
as the hook is now in place, it is no longer required to
manually run the default functions when the map gets shown.
This commit is contained in:
shagu
2022-10-31 10:44:31 +01:00
parent 9f028a6031
commit 83afabf3c0
+3 -7
View File
@@ -48,16 +48,12 @@ pfUI:RegisterModule("map", "vanilla:tbc", function ()
this.hooked = true
HookScript(WorldMapFrame, "OnShow", function()
-- default events
UpdateMicroButtons()
PlaySound("igQuestLogOpen")
CloseDropDownMenus()
SetMapToCurrentZone()
WorldMapFrame_PingPlayerPosition()
-- customize
this:EnableKeyboard(false)
this:EnableMouseWheel(1)
-- set back to default scale
WorldMapFrame:SetScale(scale or .85)
end)
HookScript(WorldMapFrame, "OnMouseWheel", function()