Permalink
Browse files

Fix alpha value during color animations.

  • Loading branch information...
J.P.P Treub
J.P.P Treub committed Dec 22, 2015
1 parent 9d5a69c commit 7ed24b6938f4e31034950dbc3f91bb40980936d6
Showing with 2 additions and 1 deletion.
  1. +2 −1 framer/Color.coffee
View
@@ -456,7 +456,8 @@ convertToPercentage = (n) ->
# If there isn't, it will be set to 1 by default.
correctAlpha = (a) ->
a = parseFloat(a)
if isNaN(a) or a < 0 or a > 1 then a = 1
if a < 0 then a = 0
if isNaN(a) or a > 1 then a = 1
return a
# Take input from [0, n] and return it as [0, 1]

0 comments on commit 7ed24b6

Please sign in to comment.