Change options.initial_image to options.initialImage

This commit is contained in:
Chinmay Pandhare
2017-03-14 00:25:09 +05:30
parent 3587e9eca9
commit 732df84378
4 changed files with 13 additions and 13 deletions

View File

@@ -184151,7 +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 = ""; options.initialImage = "";
var image, var image,
steps = [], steps = [],
@@ -184198,8 +184198,8 @@ ImageSequencer = function ImageSequencer(options) {
if (previousStep) { if (previousStep) {
// connect output of last step to input of this step // connect output of last step to input of this step
previousStep.options.output = function output(image) { previousStep.options.output = function output(image) {
if (sequencer.steps[0].options.initial_image) { if (sequencer.steps[0].options.initialImage) {
options.initial_image = sequencer.steps[0].options.initial_image; options.initialImage = sequencer.steps[0].options.initialImage;
} }
log('running module "' + name + '"'); log('running module "' + name + '"');
// display the image in any available ui // display the image in any available ui
@@ -184239,7 +184239,7 @@ ImageSequencer = function ImageSequencer(options) {
image.onload = function() { image.onload = function() {
run(image); run(image);
if (callback) callback(image); if (callback) callback(image);
options.initial_image = image; options.initialImage = image;
} }
image.src = src; image.src = src;
} }
@@ -184386,7 +184386,7 @@ module.exports = function ImageSelect(options) {
image = new Image(); image = new Image();
image.src = e.target.result; image.src = e.target.result;
options.initial_image = image; options.initialImage = 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:
@@ -184412,7 +184412,7 @@ module.exports = function ImageSelect(options) {
// this module is unique because it creates the image // this module is unique because it creates the image
function draw(image) { function draw(image) {
el.html(image); el.html(image);
options.initial_image = image; options.initialImage = image;
if (options.output) options.output(image); if (options.output) options.output(image);
} }

View File

@@ -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(sequencer.options.initial_image); // 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
}); });

View File

@@ -5,7 +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 = ""; options.initialImage = "";
var image, var image,
steps = [], steps = [],
@@ -52,8 +52,8 @@ ImageSequencer = function ImageSequencer(options) {
if (previousStep) { if (previousStep) {
// connect output of last step to input of this step // connect output of last step to input of this step
previousStep.options.output = function output(image) { previousStep.options.output = function output(image) {
if (sequencer.steps[0].options.initial_image) { if (sequencer.steps[0].options.initialImage) {
options.initial_image = sequencer.steps[0].options.initial_image; options.initialImage = sequencer.steps[0].options.initialImage;
} }
log('running module "' + name + '"'); log('running module "' + name + '"');
// display the image in any available ui // display the image in any available ui
@@ -93,7 +93,7 @@ ImageSequencer = function ImageSequencer(options) {
image.onload = function() { image.onload = function() {
run(image); run(image);
if (callback) callback(image); if (callback) callback(image);
options.initial_image = image; options.initialImage = image;
} }
image.src = src; image.src = src;
} }

View File

@@ -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;
options.initial_image = image; options.initialImage = 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:
@@ -68,7 +68,7 @@ module.exports = function ImageSelect(options) {
// this module is unique because it creates the image // this module is unique because it creates the image
function draw(image) { function draw(image) {
el.html(image); el.html(image);
options.initial_image = image; options.initialImage = image;
if (options.output) options.output(image); if (options.output) options.output(image);
} }