mozilla/pdf.js — pull request #1053 by jwagner79 (2012-01-10 06:42:59+00:00)
Title: zoom not always stored correctly in local storage

I've noticed the viewer does not always store the zoom value correctly. For example, when zooming out and going below 100% there are times when the value that is stored will be less than 1. As a result when the zoom value is retrieved by storage and recalculated (e.g. it's divided by 100), the scale will be less than 1%.

Looks like the code is checking currentScaleValue == currentScale ? currentScale * 100 : currentScaleValue.

Is the check currentScaleValue == currentScale needed?

For example, I logged the following situation occurring repeatedly:
currentScaleValue = 0.6830134553650703
currentScale = 0.9090909090909088
normalizedValue = 0.6830134553650703