I am trying to animate a button from small to its normal size. So I created it using:
local btn = widget.newButton({
defaultFile = defaultFilePath,
overFile = overFilePath,
width = 1,
height = 1,
x = 100, y = 100
})
after that I use “transition.to” to animate it to desire size 125x125 from 1x1
transition.to( btn, { time = 700, delay = 2000, transition=easing.inQuart, xScale=125, yScale=125} )
the button looks good and with size 125x125, however seems the hit area got scale up a lot more than the button and covering the entire screen. So no matter where I click on the screen it will trigger the onPress of the “btn”.
I tried to remove the line transition.to and change the width and height to 125 when I define the button, then it works fine, but I just couldn’t have the animation to scale it up. Is it a bug on scaling or did I mess up something here? Thanks.