lostbyte
lostbyte

Reputation: 486

Uncaught TypeError: Cannot set property 'fromObject' of undefined Fabric Custom Object

I created a subclass of fabric.Polygon. It is working well but I couldn't understand the concept of fromObject() method. I tried to create fromObject based on some answers on stackoverflow but so far I couldn't manage it to work. Here is the JSFiddle: https://jsfiddle.net/ohh0j02s/

Any help would be appreciated.

Upvotes: 0

Views: 1471

Answers (1)

lostbyte
lostbyte

Reputation: 486

I figured it out. I changed the var Zone to fabric.Zone and modified the fabric.Zone.fromObject function. See the updated fiddle for the solution: https://jsfiddle.net/ohh0j02s/1/

Upvotes: 1

Related Questions