Improved Docs, Chainable Methods

This commit is contained in:
Chinmay Pandhare
2017-07-06 20:34:10 +05:30
parent ef2d315089
commit 86f06813ba
3 changed files with 172 additions and 41 deletions

View File

@@ -55,6 +55,7 @@ ImageSequencer = function ImageSequencer(options) {
for (i in json_q)
for (j in json_q[i])
require("./AddStep")(this,i,json_q[i][j].name,json_q[i][j].o);
return this;
}
function removeStep(image,index) {
@@ -79,6 +80,7 @@ ImageSequencer = function ImageSequencer(options) {
removeStep(img,indices[i]);
}
// this.run(run); // This is creating problems
return this;
}
function insertSteps(image, index, name, o) {
@@ -97,6 +99,7 @@ ImageSequencer = function ImageSequencer(options) {
// run[img] = details[details.length-1].index;
}
// this.run(run); // This is Creating issues
return this;
}
function run(t_image,t_from) {
@@ -123,11 +126,13 @@ ImageSequencer = function ImageSequencer(options) {
require('./LoadImage')(this,i,json_q.images[i])
json_q.callback();
return this;
}
return {
options: options,
loadImages: loadImages,
loadImage: loadImages,
addSteps: addSteps,
removeSteps: removeSteps,
insertSteps: insertSteps,