@bwp-web/canvas 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/useEditCanvas.d.ts.map +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2756,14 +2756,17 @@ function useEditCanvas(options) {
|
|
|
2756
2756
|
});
|
|
2757
2757
|
setObjects(loaded);
|
|
2758
2758
|
} finally {
|
|
2759
|
-
isInitialLoadRef.current = false;
|
|
2760
2759
|
setIsLoading(false);
|
|
2761
2760
|
}
|
|
2762
2761
|
}
|
|
2763
2762
|
})();
|
|
2764
2763
|
initPromise.then(async () => {
|
|
2765
|
-
|
|
2766
|
-
|
|
2764
|
+
try {
|
|
2765
|
+
const onReadyResult = opts?.onReady?.(canvas);
|
|
2766
|
+
await Promise.resolve(onReadyResult);
|
|
2767
|
+
} finally {
|
|
2768
|
+
isInitialLoadRef.current = false;
|
|
2769
|
+
}
|
|
2767
2770
|
if (opts?.invertBackground !== void 0) {
|
|
2768
2771
|
setBackgroundInverted(canvas, opts.invertBackground);
|
|
2769
2772
|
}
|