I am using a custom object extended from fabric.Image in my canvas, as suggested in this answer . When I retrieve the json string from the server, I get odd errors when trying to load it onto the canvas:
var canvas = new fabric.Canvsd(); function loadCanvas(resp) {
I get an odd printout to the console: Cannot call method 'setupState' of undefined (fabric.min.js: 1118) . I tried replacing the canvas.loadFromJSON(json) call and instead got an undefined SyntaxError: Unexpected token o error. When I used regular fabric.Image before the change suggested in the linked thread, this code worked fine. I am afraid that this might be something that I missed when I expanded the favric Image with additional data. Thoughts?
json canvas load fabricjs
sa125 Jul 02 2018-12-12T00: 00Z
source share