mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 11:50:02 +01:00
Change document.sequencer_image to options.initial_image
This commit is contained in:
5
dist/image-sequencer.js
vendored
5
dist/image-sequencer.js
vendored
@@ -184151,6 +184151,7 @@ ImageSequencer = function ImageSequencer(options) {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
options.inBrowser = options.inBrowser || typeof window !== 'undefined';
|
options.inBrowser = options.inBrowser || typeof window !== 'undefined';
|
||||||
if (options.inBrowser) options.ui = options.ui || require('./UserInterface');
|
if (options.inBrowser) options.ui = options.ui || require('./UserInterface');
|
||||||
|
options.initial_image = "";
|
||||||
|
|
||||||
var image,
|
var image,
|
||||||
steps = [],
|
steps = [],
|
||||||
@@ -184235,7 +184236,7 @@ ImageSequencer = function ImageSequencer(options) {
|
|||||||
image.onload = function() {
|
image.onload = function() {
|
||||||
run(image);
|
run(image);
|
||||||
if (callback) callback(image);
|
if (callback) callback(image);
|
||||||
document.sequencer_image = image;
|
options.initial_image = image;
|
||||||
}
|
}
|
||||||
image.src = src;
|
image.src = src;
|
||||||
}
|
}
|
||||||
@@ -184382,7 +184383,7 @@ module.exports = function ImageSelect(options) {
|
|||||||
|
|
||||||
image = new Image();
|
image = new Image();
|
||||||
image.src = e.target.result;
|
image.src = e.target.result;
|
||||||
document.sequencer_image = image;
|
options.initial_image = image;
|
||||||
el.html(image); // may be redundant
|
el.html(image); // may be redundant
|
||||||
|
|
||||||
// this is done once per image:
|
// this is done once per image:
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
$('.add-step').click(function(e) {
|
$('.add-step').click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sequencer.addStep($('.select-module').val());
|
sequencer.addStep($('.select-module').val());
|
||||||
sequencer.run(document.sequencer_image); // later we might only run this step, if we can fetch the image output from the previous
|
sequencer.run(sequencer.initial_image); // later we might only run this step, if we can fetch the image output from the previous
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ ImageSequencer = function ImageSequencer(options) {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
options.inBrowser = options.inBrowser || typeof window !== 'undefined';
|
options.inBrowser = options.inBrowser || typeof window !== 'undefined';
|
||||||
if (options.inBrowser) options.ui = options.ui || require('./UserInterface');
|
if (options.inBrowser) options.ui = options.ui || require('./UserInterface');
|
||||||
|
options.initial_image = "";
|
||||||
|
|
||||||
var image,
|
var image,
|
||||||
steps = [],
|
steps = [],
|
||||||
@@ -89,7 +90,7 @@ ImageSequencer = function ImageSequencer(options) {
|
|||||||
image.onload = function() {
|
image.onload = function() {
|
||||||
run(image);
|
run(image);
|
||||||
if (callback) callback(image);
|
if (callback) callback(image);
|
||||||
document.sequencer_image = image;
|
options.initial_image = image;
|
||||||
}
|
}
|
||||||
image.src = src;
|
image.src = src;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ module.exports = function ImageSelect(options) {
|
|||||||
|
|
||||||
image = new Image();
|
image = new Image();
|
||||||
image.src = e.target.result;
|
image.src = e.target.result;
|
||||||
document.sequencer_image = image;
|
options.initial_image = image;
|
||||||
el.html(image); // may be redundant
|
el.html(image); // may be redundant
|
||||||
|
|
||||||
// this is done once per image:
|
// this is done once per image:
|
||||||
|
|||||||
Reference in New Issue
Block a user