canvas-editor-engine 1.0.60 → 1.0.62
Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts
CHANGED
@@ -4,6 +4,7 @@ import CanvasComponent from "./components/canvas.component";
|
|
4
4
|
import PipetteComponent from "./components/pipette.component";
|
5
5
|
import ExcretionComponent from "./components/excretions.component";
|
6
6
|
import SlotComponent from "./components/slot.component";
|
7
|
+
import LoadingComponent from "./components/loading.component";
|
7
8
|
import DrawService from "./services/draw.service";
|
8
9
|
import ToolService from "./services/tool.service";
|
9
10
|
import LoggerService from "./services/logger.service";
|
@@ -26,4 +27,4 @@ declare class VueCanvasEditorEngine extends CanvasEditorEngine {
|
|
26
27
|
getContext2D(): CanvasRenderingContext2D;
|
27
28
|
getCanvas(): HTMLCanvasElement;
|
28
29
|
}
|
29
|
-
export { AppConfig, PipetteComponent, CanvasComponent, ExcretionComponent, SlotComponent, ToolService, DrawService, LoggerService, CropService, DownloadService, ToolLayerService, StaticCanvasEditorEngine, VueCanvasEditorEngine, };
|
30
|
+
export { AppConfig, PipetteComponent, CanvasComponent, ExcretionComponent, SlotComponent, LoadingComponent, ToolService, DrawService, LoggerService, CropService, DownloadService, ToolLayerService, StaticCanvasEditorEngine, VueCanvasEditorEngine, };
|
package/dist/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.VueCanvasEditorEngine = exports.StaticCanvasEditorEngine = exports.ToolLayerService = exports.DownloadService = exports.CropService = exports.LoggerService = exports.DrawService = exports.ToolService = exports.SlotComponent = exports.ExcretionComponent = exports.CanvasComponent = exports.PipetteComponent = exports.AppConfig = void 0;
|
3
|
+
exports.VueCanvasEditorEngine = exports.StaticCanvasEditorEngine = exports.ToolLayerService = exports.DownloadService = exports.CropService = exports.LoggerService = exports.DrawService = exports.ToolService = exports.LoadingComponent = exports.SlotComponent = exports.ExcretionComponent = exports.CanvasComponent = exports.PipetteComponent = exports.AppConfig = void 0;
|
4
4
|
const config_1 = require("./config");
|
5
5
|
exports.AppConfig = config_1.default;
|
6
6
|
const web_component_1 = require("./web-component");
|
@@ -12,7 +12,8 @@ const excretions_component_1 = require("./components/excretions.component");
|
|
12
12
|
exports.ExcretionComponent = excretions_component_1.default;
|
13
13
|
const slot_component_1 = require("./components/slot.component");
|
14
14
|
exports.SlotComponent = slot_component_1.default;
|
15
|
-
|
15
|
+
const loading_component_1 = require("./components/loading.component");
|
16
|
+
exports.LoadingComponent = loading_component_1.default;
|
16
17
|
const draw_service_1 = require("./services/draw.service");
|
17
18
|
exports.DrawService = draw_service_1.default;
|
18
19
|
const tool_service_1 = require("./services/tool.service");
|
@@ -4,6 +4,7 @@ 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 event_service_1 = require("./event.service");
|
7
8
|
class DrawService {
|
8
9
|
static scImage;
|
9
10
|
static drawImage(ctx, src, options) {
|
@@ -12,7 +13,7 @@ class DrawService {
|
|
12
13
|
}
|
13
14
|
static drawSmoothImage(useStore, options, filterOptions) {
|
14
15
|
const filterArgs = DrawService.getFilterArgs(useStore, options);
|
15
|
-
|
16
|
+
event_service_1.default.dispatch('loading-start');
|
16
17
|
this.scImage.vague(filterArgs, filterOptions);
|
17
18
|
}
|
18
19
|
static getFilterArgs(useStore, options) {
|
@@ -14,7 +14,7 @@ class EventAtom {
|
|
14
14
|
}
|
15
15
|
exports.EventAtom = EventAtom;
|
16
16
|
class EventService {
|
17
|
-
static eventList;
|
17
|
+
static eventList = [];
|
18
18
|
static subcribe(controlEvent) {
|
19
19
|
const eventAtom = {
|
20
20
|
id: new guid4_1.Guid4().finite,
|
@@ -27,7 +27,7 @@ class EventService {
|
|
27
27
|
eventAtom.action(eventArgs);
|
28
28
|
}
|
29
29
|
static applyEvents(baseElement) {
|
30
|
-
EventService.eventList
|
30
|
+
EventService.eventList?.forEach((event) => {
|
31
31
|
baseElement.addEventListener(event.name, event.action);
|
32
32
|
});
|
33
33
|
}
|
package/dist/web-component.js
CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WebComponentWrapper = void 0;
|
4
4
|
const canvas_component_1 = require("./components/canvas.component");
|
5
5
|
const excretions_component_1 = require("./components/excretions.component");
|
6
|
-
|
6
|
+
const loading_component_1 = require("./components/loading.component");
|
7
7
|
const pipette_component_1 = require("./components/pipette.component");
|
8
8
|
const slot_component_1 = require("./components/slot.component");
|
9
9
|
const event_service_1 = require("./services/event.service");
|
@@ -90,8 +90,8 @@ class WebComponent extends HTMLElement {
|
|
90
90
|
webComponentWrapper.toolsWrap.add(slotTemplate, slotStyle);
|
91
91
|
const { excretionsTemplate, excretionsStyle } = excretions_component_1.default.getComponent();
|
92
92
|
webComponentWrapper.editorWrap.add(excretionsTemplate, excretionsStyle);
|
93
|
-
|
94
|
-
|
93
|
+
const { loadingTemplate, loadingStyle } = loading_component_1.default.getComponent();
|
94
|
+
webComponentWrapper.editorWrap.add(loadingTemplate, loadingStyle);
|
95
95
|
shadowRoot.appendChild(webComponentWrapper.baseElement);
|
96
96
|
canvas_component_1.default.simulateSubscriptions();
|
97
97
|
event_service_1.default.applyEvents(webComponentWrapper.baseElement);
|