We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1894eb5 commit 26e1124Copy full SHA for 26e1124
lib/minimap.js
@@ -860,7 +860,14 @@ export default class Minimap {
860
* @returns {number} The devicePixelRatio in the Minimap
861
*/
862
getDevicePixelRatio() {
863
- return this.getDevicePixelRatioRounding() ? Math.floor(devicePixelRatio) : devicePixelRatio
+ if (this.getDevicePixelRatioRounding()) {
864
+ if (devicePixelRatio >= 0.5) {
865
+ return Math.round(devicePixelRatio)
866
+ } else {
867
+ return Math.round(devicePixelRatio * 10) / 10
868
+ }
869
870
+ return devicePixelRatio
871
}
872
873
/**
0 commit comments