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