Doest Transition.ScaleTo reset the Anchor Points?

Hi there,

I am trying to use the transition for scaling on an image object. But before I use this transition I update the anchor points of the object (depending on where the user does pinch zoom). What I find is that the transition resets the Anchor points to the default 0.5 values before starting the scaling transition process.

  1. Is this the expected behaviour for the transition.scaleTo ?

  2. Is there a way to set the anchor points for the transition process?

transition.scaleTo( mapobject, { xScale=5 , yScale=5 , time=150, onComplete = resetzoomtransition} )

Thanks

Jay

How did you verify that?  Also, what version of Corona did you use?

I can confirm this does not happen in 2015.2744

I just ran this test:

local tmp = display.newCircle( 100, 100, 20 ) tmp.anchorX = 1 tmp.anchorY = 0 function tmp.enterFrame( self ) print(self.anchorX, self.anchorY) end Runtime:addEventListener( "enterFrame", tmp ) function tmp.onComplete( self ) Runtime:removeEventListener( "enterFrame", self ) end transition.to( tmp, { xScale = 0.5, yScale = 1.5, delay = 250, time = 250, onComplete = tmp } )

All that printed was:

1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

How did you verify that?  Also, what version of Corona did you use?

I can confirm this does not happen in 2015.2744

I just ran this test:

local tmp = display.newCircle( 100, 100, 20 ) tmp.anchorX = 1 tmp.anchorY = 0 function tmp.enterFrame( self ) print(self.anchorX, self.anchorY) end Runtime:addEventListener( "enterFrame", tmp ) function tmp.onComplete( self ) Runtime:removeEventListener( "enterFrame", self ) end transition.to( tmp, { xScale = 0.5, yScale = 1.5, delay = 250, time = 250, onComplete = tmp } )

All that printed was:

1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0