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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -