在Raphaël.js中为纸张图像添加缓动效果/ Animate()

时间:2014-05-20 18:01:06

标签: javascript jquery jquery-animate raphael

使用Raphaël.js我试图将新增图像的缓动效果(动画)添加到寻呼机中。以下是我将图像添加到纸张中的代码:

$("#change").on("click",function(){
    image2.remove();
    image2  = map.image('http://image2.png', 0, 0, 500, 500).insertBefore( circle );
});
拉斐尔正在为svg(s)制作动画

This Is The Sample

this.animate({cx: this.cx, "stroke-width": this.cx / 100, fill: this.cx - 100 ? "hsb(0, .75, .75)" : "#000", "fill-opacity": +!!(this.cx - 100)}, 1000);
    this.cx = this.cx == 300 ? 100 : 300;
});

现在我的问题是如何在将图像插入纸张时使用相同的animate()?你能告诉我怎么弄清楚吗?

由于

  

更新

$("#change").on("click",function(){
    image2.remove();
    image2  = map.image('http://image2.png', 0, 0, 500, 500).insertBefore( circle ).animate({ opacity: .2, x: 400 }, 1000, mina.easein) ;
});

0 个答案:

没有答案