Additional Testing

This commit is contained in:
Chinmay Pandhare
2017-07-11 08:28:19 +05:30
parent fdf3d140ac
commit fca24f8f8f
6 changed files with 123 additions and 20 deletions

View File

@@ -48,15 +48,15 @@ ImageSequencer = function ImageSequencer(options) {
// else if (options.imageUrl) loadImage(imageUrl);
function addSteps(){
thiss = (this.name == "ImageSequencer")?this:this.sequencer;
const this_ = (this.name == "ImageSequencer")?this:this.sequencer;
args = (this.name == "ImageSequencer")?[]:[this.images];
json_q = {};
for(arg in arguments){args.push(copy(arguments[arg]));}
json_q = formatInput.call(thiss,args,"+");
json_q = formatInput.call(this_,args,"+");
for (i in json_q)
for (j in json_q[i])
require("./AddStep")(thiss,i,json_q[i][j].name,json_q[i][j].o);
require("./AddStep")(this_,i,json_q[i][j].name,json_q[i][j].o);
return this;
}
@@ -72,7 +72,7 @@ ImageSequencer = function ImageSequencer(options) {
function removeSteps(image,index) {
run = {};
this_ = (this.name == "ImageSequencer")?this:this.sequencer;
const this_ = (this.name == "ImageSequencer")?this:this.sequencer;
args = (this.name == "ImageSequencer")?[]:[this.images];
for(arg in arguments) args.push(copy(arguments[arg]));
json_q = formatInput.call(this_,args,"-");
@@ -89,7 +89,7 @@ ImageSequencer = function ImageSequencer(options) {
function insertSteps(image, index, name, o) {
run = {};
this_ = (this.name == "ImageSequencer")?this:this.sequencer;
const this_ = (this.name == "ImageSequencer")?this:this.sequencer;
args = (this.name == "ImageSequencer")?[]:[this.images];
for (arg in arguments) args.push(arguments[arg]);
@@ -108,7 +108,7 @@ ImageSequencer = function ImageSequencer(options) {
function run(t_image,t_from) {
log('\x1b[32m%s\x1b[0m',"Running the Sequencer!");
this_ = (this.name == "ImageSequencer")?this:this.sequencer;
const this_ = (this.name == "ImageSequencer")?this:this.sequencer;
args = (this.name == "ImageSequencer")?[]:[this.images];
for (var arg in arguments) args.push(copy(arguments[arg]));
callback = function() {};
@@ -147,7 +147,7 @@ ImageSequencer = function ImageSequencer(options) {
function replaceImage(selector,steps,options) {
options = options || {};
require('./ReplaceImage')(this,selector,steps);
return require('./ReplaceImage')(this,selector,steps);
}
return {