1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Use DEFAULT_SCALE instead of 1.0 as the default value if the scale option isn't specified when initializing PDFPageView

A small piece of cleanup, in order to avoid unnecessarily hardcoding a default value.
This commit is contained in:
Jonas Jenwald 2015-08-18 12:54:08 +02:00
parent 27292b2046
commit 93f4f7a649

View file

@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* globals RenderingStates, PDFJS, CSS_UNITS, getOutputScale,
/* globals RenderingStates, PDFJS, DEFAULT_SCALE, CSS_UNITS, getOutputScale,
TextLayerBuilder, AnnotationsLayerBuilder, Promise,
approximateFraction, roundToDivide */
@ -55,7 +55,7 @@ var PDFPageView = (function PDFPageViewClosure() {
this.renderingId = 'page' + id;
this.rotation = 0;
this.scale = scale || 1.0;
this.scale = scale || DEFAULT_SCALE;
this.viewport = defaultViewport;
this.pdfPageRotate = defaultViewport.rotation;
this.hasRestrictedScaling = false;