Permalink
Browse files

Fixing animationg of fontSize and lineHeight

  • Loading branch information...
nvh committed Jul 17, 2017
1 parent 9fe65a5 commit 962b1055d143960f82594b6426fb060aa5b75f3f
Showing with 12 additions and 0 deletions.
  1. +2 −0 framer/TextLayer.coffee
  2. +10 −0 test/tests/TextLayerTest.coffee
View
@@ -44,6 +44,8 @@ class exports.TextLayer extends Layer
if options.styledText?
@styledTextOptions = options.styledText
options.color ?= @_styledText.getStyle("color")
options.fontSize ?= parseFloat(@_styledText.getStyle("fontSize"))
options.lineHeight ?= parseFloat(@_styledText.getStyle("lineHeight"))
else
_.defaults options,
backgroundColor: "transparent"
@@ -66,6 +66,16 @@ describe "TextLayer", ->
text.animate
color: "red"
it "should start animating from the fontsize the layer has", (done) ->
text = new TextLayer
styledText: simpleStyledTextOptions
text.onAnimationStart ->
text.fontSize.should.equal 16
done()
#
text.animate
color: "red"
describe "Auto-sizing", ->
it "should auto size the layer the size of the text", ->

0 comments on commit 962b105

Please sign in to comment.