Answer the question
In order to leave comments, you need to log in
How to wait for all elements to load in fabric.js?
there is a method
.....loadFromJSON(json, callback) it takes a JSON string and adds it to the canvas
, the fact is that this string contains links to images that need to be added ..
after calling this method, I call the iteration method added elements on the canvas
.getObjects() ....
the fact is that getObjects() does not return anything, I
figured it out and realized that loadFromJSON works for a long time, I execute it, and then immediately getObjects, but loadFromJSON has not yet had time to add everything to the canvas and there is nothing there because of this .... and I can no longer work with objects, although I see them in the browser, they are added ..
what to do? how to wait for loadFromJSON to be fully processed, so that later you can get everything added from the canvas?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question