当我将此画布转换为 JSON 并重新加载它时,我的画布包含对象centeredRotation:true
和其他对象。selectable:false
这些对象具有它们的默认属性。即没有中心旋转和对象是可选择的。我可以知道为什么会这样吗?显然,像 centeredRotation、selectable 这样的属性不包含在 JSON 中。
{"type":"rect","originX":"left","originY":"top","left":92,"top":53,"width":150,"height":150," fill":"#778899","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeLineJoin":"miter","strokeMiterLimit":10,"scaleX ":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":0.4,"shadow":null,"visible":true,"clipTo": null,"backgroundColor":"","rx":0,"ry":0,"x":0,"y":0}],"background":""}
加载对象时如何设置这些?