@pixldocs/canvas-renderer 0.3.22 → 0.3.23
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 +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11073,10 +11073,19 @@ class PixldocsRenderer {
|
|
|
11073
11073
|
}
|
|
11074
11074
|
const prevVPT = fabricInstance.viewportTransform ? [...fabricInstance.viewportTransform] : void 0;
|
|
11075
11075
|
const prevSvgVPT = fabricInstance.svgViewportTransformation;
|
|
11076
|
+
const prevCanvasWidth = fabricInstance.width;
|
|
11077
|
+
const prevCanvasHeight = fabricInstance.height;
|
|
11078
|
+
fabricInstance.setDimensions(
|
|
11079
|
+
{ width: canvasWidth, height: canvasHeight },
|
|
11080
|
+
{ cssOnly: false, backstoreOnly: false }
|
|
11081
|
+
);
|
|
11076
11082
|
fabricInstance.viewportTransform = [1, 0, 0, 1, 0, 0];
|
|
11077
11083
|
fabricInstance.svgViewportTransformation = false;
|
|
11078
|
-
|
|
11079
|
-
|
|
11084
|
+
const svgString = fabricInstance.toSVG();
|
|
11085
|
+
fabricInstance.setDimensions(
|
|
11086
|
+
{ width: prevCanvasWidth, height: prevCanvasHeight },
|
|
11087
|
+
{ cssOnly: false, backstoreOnly: false }
|
|
11088
|
+
);
|
|
11080
11089
|
if (prevVPT) fabricInstance.viewportTransform = prevVPT;
|
|
11081
11090
|
fabricInstance.svgViewportTransformation = prevSvgVPT;
|
|
11082
11091
|
const page = config.pages[pageIndex];
|