mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1455462 - Part 2. Use the rounded zoom value of devtool panel. r=jdescottes
This patch will use rounded zoom value of dev tool panel. This changes will ensure the zoom value test. MozReview-Commit-ID: JvSdZUbpeCH --HG-- extra : rebase_source : 390361836735f7bb1edeb28ad9e6ff40bb51e97f
This commit is contained in:
parent
9c2ce884eb
commit
c91355132f
@ -50,6 +50,8 @@ exports.register = function(window) {
|
||||
// cap zoom value
|
||||
zoomValue = Math.max(newValue, MIN_ZOOM);
|
||||
zoomValue = Math.min(zoomValue, MAX_ZOOM);
|
||||
// Prevent the floating-point error. (e.g. 1.1 + 0.1 = 1.2000000000000002)
|
||||
zoomValue = Math.round(zoomValue * 10) / 10;
|
||||
|
||||
contViewer.fullZoom = zoomValue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user