Kineticjs load json canvas -
i got error:
"typeerror: kinetic[type] not constructor"
"referenceerror: reference undefined property obj.nodetype"
when try load 1 json.
json = stage.tojson(); stage = kinetic.node.create(json, 'mycanvas');
the method _createnode kineticjs 4.3.3
var no = new kinetic[type](obj.attrs);
on canvas have simple group
var circle1 = new kinetic.circle({ x: 40, y: 50, radius: 42, fill: 'white', stroke: 'black', strokewidth: 1, draggable: false }); var polygon1tab1 = new kinetic.regularpolygon({ x: 40, y: 50, radius: 27, sides: 4, stroke: 'black', strokewidth: 4, draggable: false }); polygon1tab1.rotatedeg(45); var group1 = new kinetic.group({ draggable: true, }); group1.add(circle1.clone()); group1.add(polygon1.clone());
what "polygon1" here?
group1.add(polygon1.clone());
i created example. forks fine: http://jsfiddle.net/lavrton/n3upx/
Comments
Post a Comment