Replace pfUI's clamp/isempty/modf with ClassicAPI's Clamp/TableIsEmpty

The world map's shift/ctrl wheel alpha and scale use Clamp, and the
fresh-install profile check uses TableIsEmpty (pfUI_init and pfUI_config
are always tables by then). modf only wrapped math.modf and had no callers.
This commit is contained in:
Brues
2026-10-31 15:47:52 -05:00
parent 3b64bfa98b
commit 2b7febf617
3 changed files with 3 additions and 33 deletions
+2 -2
View File
@@ -67,14 +67,14 @@ pfUI:RegisterModule("map", function ()
WorldMapFrame:HookScript("OnMouseWheel", function()
if IsShiftKeyDown() then
alpha = clamp(WorldMapFrame:GetAlpha() + arg1/10, 0.1, 1.0)
alpha = Clamp(WorldMapFrame:GetAlpha() + arg1/10, 0.1, 1.0)
WorldMapFrame:SetAlpha(alpha)
end
if IsControlKeyDown() then
local oldscale = WorldMapFrame:GetScale()
local point, rel, relpoint, offx, offy = WorldMapFrame:GetPoint()
scale = clamp(oldscale + arg1/10, 0.1, 2.0)
scale = Clamp(oldscale + arg1/10, 0.1, 2.0)
-- recalculate world frame position based on old and new scale
if point == "TOPLEFT" and relpoint == "TOPLEFT" then