canvas-editor-engine 1.0.88 → 1.0.89

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.
@@ -4,12 +4,24 @@ exports.SCImage = void 0;
4
4
  const config_1 = require("../config");
5
5
  const filters_1 = require("../filters");
6
6
  const store_1 = require("../store/store");
7
+ const filter_1 = require("../utils/filter");
7
8
  const event_service_1 = require("./event.service");
8
9
  class DrawService {
9
10
  static scImage;
10
11
  static drawImage(ctx, src, options) {
11
12
  DrawService.scImage = new SCImage(src, ctx);
12
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
25
  }
14
26
  static drawSmoothImage(useStore, options, filterOptions) {
15
27
  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.88",
3
+ "version": "1.0.89",
4
4
  "description": "CanvasEditorEngine library, use: [typescript] [canvas]",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",