Skip to content

Commit

Permalink
v0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Lakenen committed Jun 19, 2014
1 parent ef7e9ce commit ac065cb
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Viewer.js uses [semantic versioning](http://semver.org/) for its version numbers.

* **0.5.2**
* Fix issue with optimistic asset prefetching in non-svg browsers (e.g., IE 8)
* **0.5.1**
* Preload page 1 assets ASAP to reduce time to view page 1.
* Fix a bug where requests for text layer assets could be duplicated unnecessarily
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "viewer",
"version": "0.5.1",
"version": "0.5.2",
"homepage": "https://github.com/box/viewer.js",
"authors": [
"Cameron Lakenen <lakenen@box.com>",
Expand Down
2 changes: 1 addition & 1 deletion dist/crocodoc.viewer.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Crocodoc Viewer - v0.5.1 | (c) 2014 Box */
/*! Crocodoc Viewer - v0.5.2 | (c) 2014 Box */

.crocodoc-viewer {
padding:0;
Expand Down
21 changes: 16 additions & 5 deletions dist/crocodoc.viewer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Crocodoc Viewer - v0.5.1 | (c) 2014 Box */
/*! Crocodoc Viewer - v0.5.2 | (c) 2014 Box */

var Crocodoc = (function ($) {

Expand Down Expand Up @@ -6054,6 +6054,10 @@ Crocodoc.addComponent('viewer-base', function (scope) {
throw new Error('no URL given for viewer assets');
}

if (browser.ielt9) {
config.enableTextSelection = false;
}

// make the url absolute
config.url = scope.getUtility('url').makeAbsolute(config.url);

Expand Down Expand Up @@ -6146,7 +6150,7 @@ Crocodoc.addComponent('viewer-base', function (scope) {
loadAssets: function () {
var $loadStylesheetPromise,
$loadMetadataPromise,
$pageOneSVGPromise,
$pageOneContentPromise,
$pageOneTextPromise;

$loadMetadataPromise = scope.get('metadata');
Expand All @@ -6172,7 +6176,14 @@ Crocodoc.addComponent('viewer-base', function (scope) {

// load page 1 assets immediately if necessary
if (!config.pageStart || config.pageStart === 1) {
$pageOneSVGPromise = scope.get('page-svg', 1);
if (support.svg) {
$pageOneContentPromise = scope.get('page-svg', 1);
} else if (config.conversionIsComplete) {
// unfortunately, page-1.png is not necessarily available
// on View API's document.viewable event, so we can only
// prefetch page-1.png if conversion is complete
$pageOneContentPromise = scope.get('page-img', 1);
}
if (config.enableTextSelection) {
$pageOneTextPromise = scope.get('page-text', 1);
}
Expand All @@ -6189,8 +6200,8 @@ Crocodoc.addComponent('viewer-base', function (scope) {
abort: function () {
$loadMetadataPromise.abort();
$loadStylesheetPromise.abort();
if ($pageOneSVGPromise) {
$pageOneSVGPromise.abort();
if ($pageOneContentPromise) {
$pageOneContentPromise.abort();
}
if ($pageOneTextPromise) {
$pageOneTextPromise.abort();
Expand Down
2 changes: 1 addition & 1 deletion dist/crocodoc.viewer.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/crocodoc.viewer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "viewer",
"version": "0.5.1",
"version": "0.5.2",
"description": "A viewer for documents converted with the Box View API",
"author": "Cameron Lakenen <lakenen@box.com>",
"contributors": [
Expand Down

0 comments on commit ac065cb

Please sign in to comment.