Merge pull request #6669 from Snuffleupagus/PDFPageView-default-scale

Use `DEFAULT_SCALE` instead of `1.0` as the default value if the `scale` option isn't specified when initializing `PDFPageView`
This commit is contained in:
Tim van der Meij 2015-11-20 15:43:02 +01:00
commit df46b64045

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;