Please can someone confirm this for me. I have already filed a bug report (case 28926).
Description:
if I supply a transition function in a call to transition.to it is not called on the final end value as it was before. Observed on windows simulator and android device. Not tested on other platforms.
Steps to reproduce:
Just call a transition.to with a short time on any object and supply a transition function. Now put a breakpoint in the transition function and it will be called once but when you resume from the breakpoint and the time for transition has already elapsed it will not get called again on the end value as it did before. This leaves objects hanging in the middle of the transition and requires you to supply a onComplete function to finalize everything you are doing in the transition function. instead of a breakpoint you can try doing something CPU intensive during the transition and it will have the same effect.
Sample code:
local rect = display.newRect(0, 0, 100, 100) rect:setFillColor(1, 1, 1, 1) rect.x = display.contentCenterX - 100 rect.y = 50 local rect1 = display.newRect(0, 0, 100, 100) rect1:setFillColor(1, 1, 1, 1) rect1.x = display.contentCenterX + 100 rect1.y = 50 local function transitionF(t, tMax, start, delta) local cy = start + delta \* t / tMax rect1.y = cy -- put breakpoint here return cy end transition.to(rect, {time = 200, y = 300, transition = transitionF})