app.zip
Sample code (attached also)
main-page.ts
var rootpage,moveable;
export function pageloaded(args) {
rootpage = args.object;
moveable=rootpage.getViewById('moveable');
}
export function click(args) {
moveable.translateX = -50;
moveable.translateY = -50;
moveable.animate({
translate: { x: 0, y: 0 },
duration: 200,
delay: 1000
});
}
@start, moveable is at 50,50
When we click, the moveable will go to 0,0 and after some time animation will kicks in and it will move to 0,0, it works, but when we click again, it will go to 0,0 after the animation and stay there (different behaviour with the first click)
app.zip
Sample code (attached also)
main-page.ts
@start, moveable is at 50,50
When we click, the moveable will go to 0,0 and after some time animation will kicks in and it will move to 0,0, it works, but when we click again, it will go to 0,0 after the animation and stay there (different behaviour with the first click)