Skip to content

Commit

Permalink
Fixup opening pdf after initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
moesjarraf committed Sep 16, 2015
1 parent d86a0bf commit d560c3f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -9,6 +9,6 @@
},
"dependencies": {
"angular": "~1.4.3",
"pdf.js-viewer": "https://github.com/legalthings/pdf.js-viewer.git#0.2.1"
"pdf.js-viewer": "https://github.com/legalthings/pdf.js-viewer.git#~0.2.2"
}
}
4 changes: 1 addition & 3 deletions dist/angular-pdfjs.js
Expand Up @@ -338,9 +338,7 @@ angular.module('pdfjs').directive('pdfjsViewer', [function () {
if ($attrs.width) document.getElementById('outerContainer').style.width = $attrs.width;
if ($attrs.height) document.getElementById('outerContainer').style.height = $attrs.height;

if (!PDFViewerApplication.initialized) return PDFJS.webViewerLoad($attrs.src);

PDFViewerApplication.open($attrs.src, 0);
PDFJS.webViewerLoad($attrs.src);
});
}
};
Expand Down
4 changes: 1 addition & 3 deletions src/angular-pdfjs.js
Expand Up @@ -50,9 +50,7 @@ angular.module('pdfjs').directive('pdfjsViewer', [function () {
if ($attrs.width) document.getElementById('outerContainer').style.width = $attrs.width;
if ($attrs.height) document.getElementById('outerContainer').style.height = $attrs.height;

if (!PDFViewerApplication.initialized) return PDFJS.webViewerLoad($attrs.src);

PDFViewerApplication.open($attrs.src, 0);
PDFJS.webViewerLoad($attrs.src);
});
}
};
Expand Down

0 comments on commit d560c3f

Please sign in to comment.