我在我的web应用程序中使用raphael js和raphael free-transform。问题是,当我在动画图像,只有图像是动画,而不是自由转换bbox。我想要的自由-trnsform bbox应该移动与图像时,我开始动画。该怎么做呢?
我的代码:
<b>Click on rectangle</b>
<div id="editor"></div>联署材料:
var paper = Raphael("editor", 635,500),
canvas= document.getElementById('editor').style.backgroundColor='gray';
r = paper.rect(80,40,200,80,5).click(function () {
r.animate({transform:"r-10,0,0"}, 1000);
});
r.attr({
fill:'red',
});
ft= paper.freeTransform(r,{draw:['bbox'],
rotate: true,keepRatio:[ 'axisX', 'axisY', 'bboxCorners', 'bboxSides'],
scale:[ 'axisX', 'axisY', 'bboxCorners', 'bboxSides' ]});小提琴:http://jsfiddle.net/LJTPU/11/
发布于 2014-12-05 09:38:55
做it..It的方法很好。
ft.attrs.rotate =ft.attrs.rotate+90;
https://stackoverflow.com/questions/27296026
复制相似问题