私はクラスでこの関数を書きました:
this.loadCanvas = function(json) {
// parse the data into the canvas
stage.loadFromJSON(json);
// re-render the canvas
stage.renderAll();
}
ステージは新しいファブリック オブジェクトです。
しかし、ブラウザでは次のエラーが表示されます。
Uncaught TypeError: Cannot call method 'loadFromJSON' of undefined
どうすればこれを解決できますか教えてください。