尝试调用nil值<canvas id="canvas" width="400" height="400" style="border:1px solid red"/>
var canvas = new fabric.Canvas('canvas');
var rect = new fabric.Rect({
top : 0,
left : 0,
width : 60,
height : 70,
visible: false,
fill : 'red'
});
var circle = new fabric.Circle({
radius: 100,
fill: '#eef',
scaleY: 0.5,
originX: 'center',
originY: 'center'
});
var text = new fabric.Text('hello world', {
fontSize: 30,
originX: 'center',
originY: 'center'
});
var group = new fabric.Group([ circle, text ], {
left: 150,
top: 100,
angle: -10
});
var group2 = new fabric.Group([ rect, group ], {
left: 150,
top: 100,
angle: -10
});
canvas.add(group2);
canvas.renderAll();
group2.setCoords();
local 'cb'