diff --git a/mods/worldmap-coordinates.lua b/mods/worldmap-coordinates.lua index 35a3ee7..bbfd557 100644 --- a/mods/worldmap-coordinates.lua +++ b/mods/worldmap-coordinates.lua @@ -41,7 +41,15 @@ module.enable = function(self) WorldMapButton.player.text:SetTextColor(1, 1, 1) WorldMapButton.player.text:SetJustifyH("RIGHT") + WorldMapButton.coords.elapsed = 0 WorldMapButton.coords:SetScript("OnUpdate", function() + -- Coordinates do not need a full render-frame refresh. 10 Hz keeps the + -- display responsive while avoiding repeated map/cursor queries and + -- string formatting on every frame while the world map is open. + this.elapsed = (this.elapsed or 0) + arg1 + if this.elapsed < .1 then return end + this.elapsed = 0 + local width = WorldMapButton:GetWidth() local height = WorldMapButton:GetHeight() local mx, my = WorldMapButton:GetCenter()