Skip to content

Commit

Permalink
fix UI functions (#330)
Browse files Browse the repository at this point in the history
* fix UI functions

Signed-off-by: tech4GT <[email protected]>

* Update package.json
  • Loading branch information
tech4GT authored and jywarren committed Sep 8, 2018
1 parent b707592 commit cce6514
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions dist/image-sequencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48070,10 +48070,11 @@ function InsertStep(ref, image, index, name, o) {
ref.addSteps(step['name'], step['options']);
}
}
var mod = ref.modules[name][0](o, UI);
if (!mod.isMeta) {
if (!ref.modules[name][1].length) {
UI.onSetup(o.step);
ref.images[image].steps.splice(index, 0, mod);
ref.images[image].steps.splice(index, 0, ref.modules[name][0](o, UI));
} else {
ref.modules[name][0](o, UI);
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion dist/image-sequencer.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": "image-sequencer",
"version": "2.2.2",
"version": "2.2.3",
"description": "A modular JavaScript image manipulation library modeled on a storyboard.",
"main": "src/ImageSequencer.js",
"scripts": {
Expand Down
7 changes: 4 additions & 3 deletions src/InsertStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ function InsertStep(ref, image, index, name, o) {
ref.addSteps(step['name'], step['options']);
}
}
var mod = ref.modules[name][0](o, UI);
if (!mod.isMeta) {
if (!ref.modules[name][1].length) {
UI.onSetup(o.step);
ref.images[image].steps.splice(index, 0, mod);
ref.images[image].steps.splice(index, 0, ref.modules[name][0](o, UI));
} else {
ref.modules[name][0](o, UI);
}

return true;
Expand Down

0 comments on commit cce6514

Please sign in to comment.