[英]jCanvas rotating
As the jCanvas script hereunder ... The layer rotate as expected, but only 1 time/click. 如下面的jCanvas脚本所示。图层按预期旋转,但每次单击仅1次。 Other clicks are well logged to the console but no rotation of the layer.
其他点击会很好地记录到控制台,但不会旋转图层。
Is so has an idea/advice ... 是有一个想法/建议...
pm 下午
$('canvas').drawImage(
{
source: 'image/domino/DOM-T2.png',
type: 'image',
name: 'DOM-T2-'+currentLayer,
groups: ['DOM-T2-'+currentLayer],
dragGroups: ['DOM-T2-'+currentLayer],
x: 520, y: 20,
draggable: true,
fromCenter: false,
layer: true,
click: function(layer)
{
console.log("Rotate"+'DOM-T2-'+currentLayer);
$('canvas').animateLayer('DOM-T2-'+currentLayer,
{
rotate: 90
});
}
});
</script>
I found, with help ... 我发现,有帮助...
the rotation value is not 'additive', meaning I assigned the value allready contained in rotate and not "rotate: rotate+90". 旋转值不是'additive',这意味着我分配了已包含在rotate中的值,而不是“ rotate:rotation + 90”。
Hope it may help someone else :) 希望它可以帮助别人:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.