mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-14 12:19:58 +01:00
Completed the addStep issue.
This commit is contained in:
@@ -13,6 +13,25 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
|
||||
// if in browser, prompt for an image
|
||||
if (options.imageSelect || options.inBrowser) addStep('image-select');
|
||||
// {
|
||||
// console.log('adding step "image-select"');
|
||||
// o = {};
|
||||
// o.name = 'image-select';
|
||||
// o.selector = 'ismod-image-select';
|
||||
// o.container = o.container || options.selector;
|
||||
//
|
||||
// var module = modules['image-select'](o);
|
||||
//
|
||||
// steps.push(module);
|
||||
//
|
||||
// module.setup();
|
||||
//
|
||||
// // Pre-set the initial output behavior of the final step,
|
||||
// // which will be changed if an additional step is added.
|
||||
// module.options.output = function output(image) {
|
||||
// if (module.options.ui && module.options.ui.display) module.options.ui.display(image);
|
||||
// }
|
||||
// }
|
||||
else if (options.imageUrl) loadImage(imageUrl);
|
||||
|
||||
// soon, detect local or URL?
|
||||
@@ -52,6 +71,9 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
if (previousStep) {
|
||||
// connect output of last step to input of this step
|
||||
previousStep.options.output = function output(image) {
|
||||
if (sequencer.steps[0].options.initial_image) {
|
||||
options.initial_image = sequencer.steps[0].options.initial_image;
|
||||
}
|
||||
log('running module "' + name + '"');
|
||||
// display the image in any available ui
|
||||
if (previousStep.options.ui && previousStep.options.ui.display) previousStep.options.ui.display(image);
|
||||
|
||||
Reference in New Issue
Block a user