- minor optimization of frame rotation by un-registering the event listening for animation completion after it has done its job

- made GCD module animation smooth by utilizing the existing animation system instead of trying to run another repeating timer over the top
This commit is contained in:
Parnic
2010-09-13 13:54:38 +00:00
parent f12ee4110d
commit 73cc17927e
2 changed files with 12 additions and 7 deletions

View File

@ -1231,10 +1231,10 @@ function IceBarElement.prototype:RotateFrame(frame)
rot:SetDuration(0.001)
rot:SetDegrees(-90)
rot:SetOrigin("BOTTOMLEFT", 0, 0)
rot:SetScript("OnUpdate", function(anim) if anim:GetProgress() >= 1 then anim:Pause() end end)
grp.rot = rot
frame.anim = grp
end
frame.anim.rot:SetScript("OnUpdate", function(anim) if anim:GetProgress() >= 1 then anim:Pause() anim:SetScript("OnUpdate", nil) end end)
frame.anim:Play()
end