fabric 5.5.0-browser → 5.5.1-browser
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/CHANGELOG.md +4 -0
- package/dist/fabric.js +7 -20
- package/dist/fabric.min.js +1 -1
- package/package.json +1 -1
- package/src/shapes/object.class.js +7 -20
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "fabric",
|
|
3
3
|
"description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.",
|
|
4
4
|
"homepage": "http://fabricjs.com/",
|
|
5
|
-
"version": "5.5.
|
|
5
|
+
"version": "5.5.1-browser",
|
|
6
6
|
"author": "Juriy Zaytsev <kangax@gmail.com>",
|
|
7
7
|
"contributors": [
|
|
8
8
|
{
|
|
@@ -734,8 +734,8 @@
|
|
|
734
734
|
// for sure this ALIASING_LIMIT is slightly creating problem
|
|
735
735
|
// in situation in which the cache canvas gets an upper limit
|
|
736
736
|
// also objectScale contains already scaleX and scaleY
|
|
737
|
-
width: neededX + ALIASING_LIMIT,
|
|
738
|
-
height: neededY + ALIASING_LIMIT,
|
|
737
|
+
width: Math.ceil(neededX + ALIASING_LIMIT),
|
|
738
|
+
height: Math.ceil(neededY + ALIASING_LIMIT),
|
|
739
739
|
zoomX: objectScale.scaleX,
|
|
740
740
|
zoomY: objectScale.scaleY,
|
|
741
741
|
x: neededX,
|
|
@@ -760,29 +760,16 @@
|
|
|
760
760
|
}
|
|
761
761
|
var canvas = this._cacheCanvas,
|
|
762
762
|
dims = this._limitCacheSize(this._getCacheCanvasDimensions()),
|
|
763
|
-
minCacheSize = fabric.minCacheSideLimit,
|
|
764
763
|
width = dims.width, height = dims.height, drawingWidth, drawingHeight,
|
|
765
764
|
zoomX = dims.zoomX, zoomY = dims.zoomY,
|
|
766
765
|
dimensionsChanged = width !== this.cacheWidth || height !== this.cacheHeight,
|
|
767
766
|
zoomChanged = this.zoomX !== zoomX || this.zoomY !== zoomY,
|
|
768
|
-
shouldRedraw = dimensionsChanged || zoomChanged
|
|
769
|
-
|
|
770
|
-
if (dimensionsChanged) {
|
|
771
|
-
var canvasWidth = this._cacheCanvas.width,
|
|
772
|
-
canvasHeight = this._cacheCanvas.height,
|
|
773
|
-
sizeGrowing = width > canvasWidth || height > canvasHeight,
|
|
774
|
-
sizeShrinking = (width < canvasWidth * 0.9 || height < canvasHeight * 0.9) &&
|
|
775
|
-
canvasWidth > minCacheSize && canvasHeight > minCacheSize;
|
|
776
|
-
shouldResizeCanvas = sizeGrowing || sizeShrinking;
|
|
777
|
-
if (sizeGrowing && !dims.capped && (width > minCacheSize || height > minCacheSize)) {
|
|
778
|
-
additionalWidth = width * 0.1;
|
|
779
|
-
additionalHeight = height * 0.1;
|
|
780
|
-
}
|
|
781
|
-
}
|
|
767
|
+
shouldRedraw = dimensionsChanged || zoomChanged;
|
|
768
|
+
|
|
782
769
|
if (shouldRedraw) {
|
|
783
|
-
if (
|
|
784
|
-
canvas.width =
|
|
785
|
-
canvas.height =
|
|
770
|
+
if (dimensionsChanged) {
|
|
771
|
+
canvas.width = width;
|
|
772
|
+
canvas.height = height;
|
|
786
773
|
}
|
|
787
774
|
else {
|
|
788
775
|
this._cacheContext.setTransform(1, 0, 0, 1, 0, 0);
|