Fabric.js 提供了一个方法 absolutePositioned
来将多选框内的元素的坐标从相对多选框变成相对整个画布。
示例:
var rect = new fabric.Rect({
left: 100,
top: 100,
width: 50,
height: 50,
fill: 'red'
});
var group = new fabric.Group([rect], {
left: 50,
top: 50
});
group.absolutePositioned = true;
canvas.add(group);