Fix import image (#282)

* fix default image path

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* fix importImage to take proper input

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
Varun Gupta
2018-06-07 05:33:50 +05:30
committed by Jeffrey Warren
parent 37122d4c28
commit 2b07ecdb36
5 changed files with 12962 additions and 11771 deletions

23509
dist/image-sequencer.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -9,7 +9,7 @@
module.exports = function ImportImageModule(options, UI) { module.exports = function ImportImageModule(options, UI) {
options = options || {}; options = options || {};
options.imageUrl = options.imageUrl || "/examples/images/monarch.png"; options.imageUrl = options.url || "/examples/images/monarch.png";
var output, var output,
imgObj = new Image(); imgObj = new Image();

View File

@@ -30,7 +30,9 @@ module.exports = function ImportImageModuleUi(step, ui) {
onLoad: function onLoadFromInput(progress) { onLoad: function onLoadFromInput(progress) {
var reader = progress.target; var reader = progress.target;
step.options.imageUrl = reader.result; step.options.imageUrl = reader.result;
step.options.url = reader.result;
sequencer.run(); sequencer.run();
setUrlHashParameter("steps", sequencer.toString());
} }
}); });

View File

@@ -6,7 +6,7 @@
"url": { "url": {
"type": "string", "type": "string",
"desc": "URL of image to import", "desc": "URL of image to import",
"default": "/examples/images/monarch.png" "default": "./images/monarch.png"
} }
} }
} }