mirror of
https://github.com/publiclab/image-sequencer.git
synced 2026-01-04 14:40:18 +01:00
* Fix : add a step in the demo * Change global variable to document.sequencer_image * Change global variable to document.sequencer_image * Small fix for FireFox; Ref: Issue #7 * Change document.sequencer_image to options.image * Change document.sequencer_image to options.initial_image * Completed the addStep issue. * Completed the addStep issue. * Change options.initial_image to options.initialImage * Added Crop Module * lowercase parameters * Merging Crop.js * Merging Crop.js * Merging Crop.js
This commit is contained in:
committed by
Jeffrey Warren
parent
bf4a264ed9
commit
38a569b958
9
dist/image-sequencer.js
vendored
9
dist/image-sequencer.js
vendored
@@ -184197,6 +184197,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.initialImage) {
|
||||
options.initialImage = sequencer.steps[0].options.initialImage;
|
||||
}
|
||||
log('running module "' + name + '"');
|
||||
// display the image in any available ui
|
||||
if (previousStep.options.ui && previousStep.options.ui.display) previousStep.options.ui.display(image);
|
||||
@@ -184235,6 +184238,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
image.onload = function() {
|
||||
run(image);
|
||||
if (callback) callback(image);
|
||||
options.initialImage = image;
|
||||
}
|
||||
image.src = src;
|
||||
}
|
||||
@@ -184443,8 +184447,8 @@ module.exports = function ImageSelect(options) {
|
||||
// we should trigger "load" event here
|
||||
|
||||
image = new Image();
|
||||
image.src = event.target.result;
|
||||
|
||||
image.src = e.target.result;
|
||||
options.initialImage = image;
|
||||
el.html(image); // may be redundant
|
||||
|
||||
// this is done once per image:
|
||||
@@ -184470,6 +184474,7 @@ module.exports = function ImageSelect(options) {
|
||||
// this module is unique because it creates the image
|
||||
function draw(image) {
|
||||
el.html(image);
|
||||
options.initialImage = image;
|
||||
if (options.output) options.output(image);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,10 +73,9 @@
|
||||
//sequencer.addStep('plot');
|
||||
|
||||
$('.add-step').click(function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
sequencer.addStep($('.select-module').val());
|
||||
sequencer.run(); // later we might only run this step, if we can fetch the image output from the previous
|
||||
sequencer.run(sequencer.options.initialImage); // later we might only run this step, if we can fetch the image output from the previous
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -51,6 +51,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.initialImage) {
|
||||
options.initialImage = sequencer.steps[0].options.initialImage;
|
||||
}
|
||||
log('running module "' + name + '"');
|
||||
// display the image in any available ui
|
||||
if (previousStep.options.ui && previousStep.options.ui.display) previousStep.options.ui.display(image);
|
||||
@@ -83,12 +86,12 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
// load default starting image
|
||||
// i.e. from parameter
|
||||
// this could send the image to ImageSelect, or something?
|
||||
// not currently working
|
||||
function loadImage(src, callback) {
|
||||
image = new Image();
|
||||
image.onload = function() {
|
||||
run(image);
|
||||
if (callback) callback(image);
|
||||
options.initialImage = image;
|
||||
}
|
||||
image.src = src;
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ module.exports = function ImageSelect(options) {
|
||||
// we should trigger "load" event here
|
||||
|
||||
image = new Image();
|
||||
image.src = event.target.result;
|
||||
|
||||
image.src = e.target.result;
|
||||
options.initialImage = image;
|
||||
el.html(image); // may be redundant
|
||||
|
||||
// this is done once per image:
|
||||
@@ -68,6 +68,7 @@ module.exports = function ImageSelect(options) {
|
||||
// this module is unique because it creates the image
|
||||
function draw(image) {
|
||||
el.html(image);
|
||||
options.initialImage = image;
|
||||
if (options.output) options.output(image);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user