mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-14 12:19:58 +01:00
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:
committed by
Jeffrey Warren
parent
bd490d2515
commit
09c4f250a2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user