add API to get steps (#259)

* add API to get steps

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* update dist and refactor

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* rename to getStepOutput

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* api complete

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* add test

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* change indentation to 2 spaces

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* minor fixes

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* new API

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* remove commented code

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* modifiication to invert

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
Varun Gupta
2018-05-24 06:08:20 +05:30
committed by Jeffrey Warren
parent bd490d2515
commit 09c4f250a2
7 changed files with 12356 additions and 11224 deletions

View File

@@ -9,7 +9,7 @@ function InsertStep(ref, image, index, name, o) {
o.container = o_.container || ref.options.selector;
o.image = image;
if(index==-1) index = ref.images[image].steps.length;
if (index == -1) index = ref.images[image].steps.length;
o.step = {
name: o.name,
@@ -22,8 +22,11 @@ function InsertStep(ref, image, index, name, o) {
options: o
};
var UI = ref.events;
var module = ref.modules[name][0](o,UI);
ref.images[image].steps.splice(index,0,module);
this.getStep = function getStep(offset) {
return ref.images[image].steps.slice(offset)[0];
}
var module = ref.modules[name][0].bind(this)(o, UI);
ref.images[image].steps.splice(index, 0, module);
return true;
}