Take the 2-minute tour ×

This is difficult to explain, but I'm creating text via:

txt = paper.text(10, fontSize / 2 + 10, 'YOUR NAME').attr({
    'fill': '#fff',
    'font-size': fontSize + 'px',
    'font-family': 'Impact',
    'text-anchor': 'start'

And then animating it:

txt.animate({transform: 's0.3'}, 1000);

And the text shrinks around a center anchor point. Is there some way to get it to scale down and maintain the same X position (left anchor)?

share|improve this question

1 Answer 1

Found it. There are optional coordinate parameters for 's' to specify origin point. This fixes it:

txt.animate({transform: 's0.3,0.3,0,0'}, 1000);

Params for scale: s[SCALEX],[SCALEY],[ORIGINX],[ORIGINY]

share|improve this answer

Your Answer


