canvas-editor-engine 2.3.43 → 2.3.45

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/index.mjs CHANGED
@@ -2681,6 +2681,13 @@ var DrawAccumulatorService = function() {
2681
2681
  }));
2682
2682
  }));
2683
2683
  };
2684
+ DrawAccumulatorService.prototype.getPainterById = function(painterId) {
2685
+ var painter = this.painters.find((function(painter) {
2686
+ return painter.id === painterId;
2687
+ }));
2688
+ if (!painter) throw new Error("Painter not found");
2689
+ return painter;
2690
+ };
2684
2691
  DrawAccumulatorService.prototype.removePainter = function(painterId) {
2685
2692
  return __awaiter(this, void 0, void 0, (function() {
2686
2693
  var painter, filteredPainters, len;
@@ -15,6 +15,7 @@ export default class DrawAccumulatorService {
15
15
  painters: Painter[];
16
16
  constructor(appConfig: AppConfig, appStoreRepository: AppStoreRepository, eventService: EventService, drawLayersService: DrawLayersService);
17
17
  add<DrawType extends TDrawType>(layerId: ILayer['id'], drawType: DrawType, options: DrawService['options'][DrawType], initialSize: ITempCanvasOptions): Promise<void>;
18
+ getPainterById(painterId: string): Painter;
18
19
  removePainter(painterId: string): Promise<void>;
19
20
  renamePainter(painterId: IPainter['id'], name: string): void;
20
21
  smoothFilter(painterId: IPainter['id'], smoothFilterOptions: ISmoothFilterOptions): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvas-editor-engine",
3
- "version": "2.3.43",
3
+ "version": "2.3.45",
4
4
  "description": "CanvasEditorEngine library, use: [typescript] [canvas]",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",