Transition rect's width?

It works, but it expands to both sides, even if you set initial and target left position to the same value and xxxLeftReference point.

[lua] local rect = display.newRect(50, 0, 10, 5)
rect:setReferencePoint(display.TopLeftReferencePoint)
rect.x = 50
transition.to(rect, {time = 2000, x=50, width=300})[/lua]

Anybody knows if there is way to make the rect expand only to the right? [import]uid: 52103 topic_id: 17603 reply_id: 317603[/import]

local prevWidth, newWidth = 10, 300
transition.to(rect, {time = 2000, xScale=newWidth/prevWidth}) [import]uid: 65903 topic_id: 17603 reply_id: 66989[/import]

But of course! :slight_smile: Thanks!

@Ansca: it still would be nice to have the width transition work as expected. One has to remember the original scale for this ^^^ to work backwards. [import]uid: 52103 topic_id: 17603 reply_id: 66999[/import]