mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-02 08:56:57 +00:00
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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user