Skip to content

Commit

Permalink
fix(): MAJOR prevent render canvas with quality less than 100% (#7537)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitonsky committed Jan 9, 2022
1 parent 419c592 commit da355a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/static_canvas.class.js
Expand Up @@ -232,15 +232,15 @@
* @private
*/
_isRetinaScaling: function() {
return (fabric.devicePixelRatio !== 1 && this.enableRetinaScaling);
return (fabric.devicePixelRatio > 1 && this.enableRetinaScaling);
},

/**
* @private
* @return {Number} retinaScaling if applied, otherwise 1;
*/
getRetinaScaling: function() {
return this._isRetinaScaling() ? fabric.devicePixelRatio : 1;
return Math.max(1, fabric.devicePixelRatio);
},

/**
Expand Down

0 comments on commit da355a9

Please sign in to comment.