Skip to content

Commit

Permalink
#6 - fixed on_finish param handling - it must be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
viliusle committed Aug 11, 2017
1 parent 1126997 commit cd1917c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/hermite.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/hermite.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Hermite resize - fast image resize/resample using Hermite filter.
* Version: 2.2
* Version: 2.2.1
* Author: ViliusL
* demo: http://viliusle.github.io/miniPaint/
*/
Expand Down Expand Up @@ -43,7 +43,9 @@ function Hermite_class() {
} else {
//1 cpu version
this.resample_single(canvas, width, height, true);
on_finish();
if(on_finish != undefined) {
on_finish();
}
}
};

Expand Down Expand Up @@ -188,7 +190,9 @@ function Hermite_class() {

if (workers_in_use <= 0) {
//finish
on_finish();
if(on_finish != undefined) {
on_finish();
}
}
};
var objData = {
Expand Down

0 comments on commit cd1917c

Please sign in to comment.