fabric.Pathを使用してシェイプを作成しようとしていますが、その中心を中心に回転できるようにしたいと思います。問題は、バウンディングボックスがオフセットされており、実際の形状がその中心を中心に踊っているということです。
this.canvas = new fabric.Canvas('c')
this.canvas.clear();
var triangle = new fabric.Triangle({
width: 20,
height: 20,
fill: '#35a2da',
left: 410,
top: 350,
angle: 90
});
var path = new fabric.Path(
"M 200 175 A 25 25 0 1 0 217.678 217.678",
{
fill : '',
stroke : '#35a2da',
strokeWidth : 7,
left: 200,
top:200
});
var rotate = new fabric.Group([path, triangle], {left:200, top:200});
this.canvas.add(rotate);
上記のコードはここにあります。