canvas-editor-engine 1.0.89 → 1.0.91

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.
@@ -10,18 +10,19 @@ class DrawService {
10
10
  static scImage;
11
11
  static drawImage(ctx, src, options) {
12
12
  DrawService.scImage = new SCImage(src, ctx);
13
- DrawService.scImage.draw(options);
14
- const filter = new filter_1.Filter(ctx);
15
- const zeroPosition = {
16
- x: 0,
17
- y: 0,
18
- };
19
- const imageData = filter.copy(zeroPosition);
20
- store_1.default.store.imageState.reduce({
21
- tempImageData: imageData,
22
- position: zeroPosition,
23
- size: config_1.default.CANVAS_SIZE,
24
- }, "Loaded image");
13
+ DrawService.scImage.draw(options).then(() => {
14
+ const filter = new filter_1.Filter(ctx);
15
+ const zeroPosition = {
16
+ x: 0,
17
+ y: 0,
18
+ };
19
+ const imageData = filter.copy(zeroPosition);
20
+ store_1.default.store.imageState.reduce({
21
+ tempImageData: imageData,
22
+ position: zeroPosition,
23
+ size: config_1.default.CANVAS_SIZE,
24
+ }, "Loaded image");
25
+ });
25
26
  }
26
27
  static drawSmoothImage(useStore, options, filterOptions) {
27
28
  const filterArgs = DrawService.getFilterArgs(useStore, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvas-editor-engine",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "description": "CanvasEditorEngine library, use: [typescript] [canvas]",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",