相关疑难解决方法(0)

Raphael JS:如何移动/动画路径对象?

不知怎的,这不起作用......

var paper = Raphael("test", 500, 500);

var testpath = paper.path('M100 100L190 190');

var a = paper.rect(0,0,10,10);
a.attr('fill', 'silver');

a.mousedown( function() {
  testpath.animate({x: 400}, 1000);
});
Run Code Online (Sandbox Code Playgroud)

我可以通过这种方式移动rects而不是路径,为什么会这样,以及如何移动路径对象呢?!

javascript animation move path raphael

12
推荐指数
3
解决办法
3万
查看次数

标签 统计

animation ×1

javascript ×1

move ×1

path ×1

raphael ×1