canvas-editor-engine 2.1.17 → 2.1.18
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 +14 -7
- package/dist/store/storeRepository.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1396,6 +1396,19 @@ var ImageState = function() {
|
|
1396
1396
|
return ImageState;
|
1397
1397
|
}();
|
1398
1398
|
|
1399
|
+
var AppStoreRepository = function() {
|
1400
|
+
function AppStoreRepository() {
|
1401
|
+
AppStoreRepository.repositories.push(this);
|
1402
|
+
}
|
1403
|
+
AppStoreRepository.setStore = function(storeInstanse) {
|
1404
|
+
AppStoreRepository.repositories.forEach((function(repositories) {
|
1405
|
+
repositories.store = storeInstanse;
|
1406
|
+
}));
|
1407
|
+
};
|
1408
|
+
AppStoreRepository.repositories = [];
|
1409
|
+
return AppStoreRepository;
|
1410
|
+
}();
|
1411
|
+
|
1399
1412
|
var Store = function() {
|
1400
1413
|
function Store(imageState, historyState) {
|
1401
1414
|
this.imageState = imageState;
|
@@ -1412,7 +1425,7 @@ var AppStore = function() {
|
|
1412
1425
|
function AppStore(throughHistoryService, appStoreRepository) {
|
1413
1426
|
this.throughHistoryService = throughHistoryService;
|
1414
1427
|
this.appStoreRepository = appStoreRepository;
|
1415
|
-
|
1428
|
+
AppStoreRepository.setStore(new Store(new ImageState(this.appStoreRepository), new HistoryState(this.throughHistoryService)));
|
1416
1429
|
}
|
1417
1430
|
AppStore.prototype.subscribe = function(to, completeIt) {
|
1418
1431
|
if (to === "history") {
|
@@ -1472,11 +1485,6 @@ var ThroughHistoryService = function() {
|
|
1472
1485
|
return ThroughHistoryService;
|
1473
1486
|
}();
|
1474
1487
|
|
1475
|
-
var AppStoreRepository = function() {
|
1476
|
-
function AppStoreRepository() {}
|
1477
|
-
return AppStoreRepository;
|
1478
|
-
}();
|
1479
|
-
|
1480
1488
|
var ProjectFileSerializer = function() {
|
1481
1489
|
function ProjectFileSerializer(file) {
|
1482
1490
|
this.projects = [];
|
@@ -2168,7 +2176,6 @@ var WebComponent = function(_super) {
|
|
2168
2176
|
this.throughHistoryService = new ThroughHistoryService(this.appConfig, this.appStoreRepository);
|
2169
2177
|
this.appStore = new AppStore(this.throughHistoryService, this.appStoreRepository);
|
2170
2178
|
this.pullProjectService = new PullProjectService(this.throughHistoryService, this.appStoreRepository);
|
2171
|
-
console.log("this.appStoreRepository", this.appStoreRepository);
|
2172
2179
|
this.drawService = new DrawService(this.appConfig, this.appStoreRepository, this.eventService);
|
2173
2180
|
this.downloadService = new DownloadService(this.canvasComponent);
|
2174
2181
|
var _a = this.canvasComponent.getComponent(), canvasTemplate = _a.canvasTemplate, canvasStyle = _a.canvasStyle;
|