I have drawn a box. The first animation makes the box move horizontally and the second one moves the box vertically. But when the second animation is executed the box first comes back to its original position and then animates vertically. What I want is that the box shouldn't come back to its original position and where the first animation ends, the second animation must execute exactly from that position. How can I achieve this? What am I doing wrong?
JS Fiddle Code
window.onload = function (){
var paper = Raphael(0,0,800,400);
var hi = paper.rect(10,10,100,30);
var move1 = Raphael.animation({
transform:'t100,0'
},1000);
var move2 = Raphael.animation({
transform:'t0,100'
},1000);
hi.animate(move1);
hi.animate(move2.delay(1000));
}