@knotx/plugins-canvas 0.4.13 → 0.4.15
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.cjs +8 -3
- package/dist/index.js +8 -3
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -503,10 +503,15 @@ class Canvas extends (_a = core.BasePlugin, _transform_dec = [decorators.registe
|
|
|
503
503
|
createZoomPanPinch() {
|
|
504
504
|
const defaultTransform = this.getDefaultTransform();
|
|
505
505
|
this.zoomPanPinch = new reactZoomPanPinch.ZoomPanPinch(this.config);
|
|
506
|
-
if (defaultTransform) {
|
|
507
|
-
this.zoomPanPinch.
|
|
506
|
+
if (defaultTransform && this.container && this.contentSize) {
|
|
507
|
+
this.zoomPanPinch.presetTransformStateBeforeInit({
|
|
508
|
+
wrapperSize: this.container,
|
|
509
|
+
contentSize: this.contentSize,
|
|
510
|
+
positionX: defaultTransform.positionX,
|
|
511
|
+
positionY: defaultTransform.positionY
|
|
512
|
+
});
|
|
513
|
+
this.transform = __spreadValues({}, this.zoomPanPinch.transformState);
|
|
508
514
|
}
|
|
509
|
-
this.transform = __spreadValues({}, this.zoomPanPinch.transformState);
|
|
510
515
|
}
|
|
511
516
|
groupLayers(children) {
|
|
512
517
|
const fixedLayers = [];
|
package/dist/index.js
CHANGED
|
@@ -501,10 +501,15 @@ class Canvas extends (_a = BasePlugin, _transform_dec = [register("transform")],
|
|
|
501
501
|
createZoomPanPinch() {
|
|
502
502
|
const defaultTransform = this.getDefaultTransform();
|
|
503
503
|
this.zoomPanPinch = new ZoomPanPinch(this.config);
|
|
504
|
-
if (defaultTransform) {
|
|
505
|
-
this.zoomPanPinch.
|
|
504
|
+
if (defaultTransform && this.container && this.contentSize) {
|
|
505
|
+
this.zoomPanPinch.presetTransformStateBeforeInit({
|
|
506
|
+
wrapperSize: this.container,
|
|
507
|
+
contentSize: this.contentSize,
|
|
508
|
+
positionX: defaultTransform.positionX,
|
|
509
|
+
positionY: defaultTransform.positionY
|
|
510
|
+
});
|
|
511
|
+
this.transform = __spreadValues({}, this.zoomPanPinch.transformState);
|
|
506
512
|
}
|
|
507
|
-
this.transform = __spreadValues({}, this.zoomPanPinch.transformState);
|
|
508
513
|
}
|
|
509
514
|
groupLayers(children) {
|
|
510
515
|
const fixedLayers = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knotx/plugins-canvas",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.15",
|
|
4
4
|
"description": "Canvas Plugin for Knotx",
|
|
5
5
|
"author": "boenfu",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
],
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": ">=17.0.0",
|
|
32
|
-
"@knotx/jsx": "0.4.
|
|
33
|
-
"@knotx/plugins-history": "0.4.
|
|
32
|
+
"@knotx/jsx": "0.4.15",
|
|
33
|
+
"@knotx/plugins-history": "0.4.15"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@knotx/react-zoom-pan-pinch": "^3.9.
|
|
36
|
+
"@knotx/react-zoom-pan-pinch": "^3.9.12",
|
|
37
37
|
"lodash-es": "^4.17.21",
|
|
38
38
|
"rxjs": "^7.8.1",
|
|
39
|
-
"@knotx/core": "0.4.
|
|
40
|
-
"@knotx/decorators": "0.4.
|
|
39
|
+
"@knotx/core": "0.4.15",
|
|
40
|
+
"@knotx/decorators": "0.4.15"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/lodash-es": "^4.17.12",
|
|
44
44
|
"@types/react": "^17.0.0",
|
|
45
45
|
"react": "^17.0.0",
|
|
46
|
-
"@knotx/build-config": "0.4.
|
|
47
|
-
"@knotx/eslint-config": "0.4.
|
|
48
|
-
"@knotx/jsx": "0.4.
|
|
49
|
-
"@knotx/plugins-history": "0.4.
|
|
50
|
-
"@knotx/typescript-config": "0.4.
|
|
46
|
+
"@knotx/build-config": "0.4.15",
|
|
47
|
+
"@knotx/eslint-config": "0.4.15",
|
|
48
|
+
"@knotx/jsx": "0.4.15",
|
|
49
|
+
"@knotx/plugins-history": "0.4.15",
|
|
50
|
+
"@knotx/typescript-config": "0.4.15"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "unbuild",
|