diff --git a/examples/index.html b/examples/index.html index 076ef8bad2..fb461052ef 100644 --- a/examples/index.html +++ b/examples/index.html @@ -36,10 +36,13 @@
+ + + diff --git a/examples/lib/defaultHtmlStepUi.js b/examples/lib/defaultHtmlStepUi.js index cc8b032172..679b545ef7 100644 --- a/examples/lib/defaultHtmlStepUi.js +++ b/examples/lib/defaultHtmlStepUi.js @@ -206,7 +206,7 @@ function DefaultHtmlStepUi(_sequencer, options) { $(input) .data('initValue', $(input).val()) .data('hasChangedBefore', false) - .on('input', function() { + .on('input change' , function() { $(this) .focus() .data('hasChangedBefore', diff --git a/package.json b/package.json index 623e427634..90c0477e64 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "src/ImageSequencer.js", "scripts": { "debug": "TEST=true node ./index.js -i ./examples/images/monarch.png -s invert", - "test": "TEST=true istanbul cover tape test/core/*.js test/core/ui/user-interface.js test/core/modules/canvas-resize.js test/core/modules/QR.js | tap-spec; browserify test/core/modules/image-sequencer.js test/core/modules/chain.js test/core/modules/meta-modules.js test/core/modules/replace.js test/core/modules/import-export.js test/core/modules/run.js test/core/modules/dynamic-imports.js test/core/util/parse-input.js test/core/modules/benchmark.js| tape-run --render=\"tap-spec\"", + "test": "TEST=true istanbul cover tape test/core/*.js test/core/ui/user-interface.js test/core/modules/canvas-resize.js test/core/modules/QR.js test/core/modules/crop.js | tap-spec; browserify test/core/modules/image-sequencer.js test/core/modules/chain.js test/core/modules/meta-modules.js test/core/modules/replace.js test/core/modules/import-export.js test/core/modules/run.js test/core/modules/dynamic-imports.js test/core/util/parse-input.js test/core/modules/benchmark.js| tape-run --render=\"tap-spec\"", "test-ui": "jasmine test/spec/*.js", "setup": "npm i && npm i -g grunt grunt-cli && grunt build", "start": "grunt serve" diff --git a/src/modules/Crop/Crop.js b/src/modules/Crop/Crop.js index 52213b3061..5b0168154e 100644 --- a/src/modules/Crop/Crop.js +++ b/src/modules/Crop/Crop.js @@ -21,14 +21,21 @@ module.exports = function Crop(input,options,callback) { for(var i = 0; i < w ; i++){ backgroundArray = backgroundArray.concat([backgroundColor[0],backgroundColor[1],backgroundColor[2],backgroundColor[3]]); } - var newarray = new Uint8Array(4*w*h); + // var newarray = new Uint8Array(4*w*h); + var array = [] for (var n = oy; n < oy + h; n++) { + var offsetValue = 4*w*n; if(n