Skip to content

Commit

Permalink
ensure that CD.getImages actually suspends crop
Browse files Browse the repository at this point in the history
  • Loading branch information
mnutt committed Apr 22, 2015
1 parent 8d949c9 commit def9d05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -164,6 +164,9 @@ Alternatively, for command-line tests:

## Changelog

### master
* Ensure that `CD.getImages` actually suspends crop

### 2.7.1
* Remove window.onerror handler
* Ensure that failing requests actually call callback with `null`, rather than empty string
Expand Down
3 changes: 3 additions & 0 deletions lib/cropduster.js
Expand Up @@ -200,6 +200,7 @@ window.CD = {
callback = args.pop();
url = args[0];
options = args[1] || {};
options.maxSuspension = options.maxSuspension || 1000;

var imagesLeft = urls.length;
var imgs = [];
Expand All @@ -226,6 +227,8 @@ window.CD = {
})(urls[i], i);
}

CD.suspend(options.maxSuspension);

function callbackNext() {
var next = calledIndex + 1;
if(imgs[next]) {
Expand Down

0 comments on commit def9d05

Please sign in to comment.