Skip to content

Commit

Permalink
Use constant default in place of magic number + comment
Browse files Browse the repository at this point in the history
  • Loading branch information
seanburke-wf committed Nov 21, 2016
1 parent 85d5c17 commit 31fe234
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ var AnnotationFactory = coreAnnotation.AnnotationFactory;

var Page = (function PageClosure() {

var DEFAULT_USER_UNIT = 1.0;
var LETTER_SIZE_MEDIABOX = [0, 0, 612, 792];

function Page(pdfManager, xref, pageIndex, pageDict, ref, fontCache) {
Expand Down Expand Up @@ -140,9 +141,8 @@ var Page = (function PageClosure() {

get userUnit() {
var obj = this.getPageProp('UserUnit');
// Optional according to the spec with a default value of 1.0.
if (typeof obj !== 'number') {
obj = 1.0;
obj = DEFAULT_USER_UNIT;
}
return shadow(this, 'userUnit', obj);
},
Expand Down

0 comments on commit 31fe234

Please sign in to comment.