File tree Expand file tree Collapse file tree 4 files changed +351
-247
lines changed Expand file tree Collapse file tree 4 files changed +351
-247
lines changed Original file line number Diff line number Diff line change @@ -860,7 +860,14 @@ export default class Minimap {
860860 * @returns {number } The devicePixelRatio in the Minimap
861861 */
862862 getDevicePixelRatio ( ) {
863- return this . getDevicePixelRatioRounding ( ) ? Math . floor ( devicePixelRatio ) : devicePixelRatio
863+ if ( this . getDevicePixelRatioRounding ( ) ) {
864+ if ( devicePixelRatio >= 1 ) {
865+ return Math . round ( devicePixelRatio )
866+ } else {
867+ return Math . max ( Math . round ( devicePixelRatio * 10 ) / 10 , 0.1 )
868+ }
869+ }
870+ return devicePixelRatio
864871 }
865872
866873 /**
Original file line number Diff line number Diff line change 7777 "eslint-config-atomic" : " ^1.16.1" ,
7878 "jasmine-expect" : " ^5.0.0" ,
7979 "npm-check-updates" : " latest" ,
80- "parcel" : " ^ 2.0.0-nightly.734 " ,
80+ "parcel" : " 2.0.0-nightly.760 " ,
8181 "prettier-config-atomic" : " ^2.0.5" ,
8282 "shx" : " ^0.3.3" ,
8383 "terser-config-atomic" : " ^0.1.1" ,
You can’t perform that action at this time.
0 commit comments