mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-14 12:19:58 +01:00
Prev step final API (#268)
* 1.7.0 * fix the api Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fixes #266 Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * finally got this to work! Phew :D Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * remove extra log Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * getStepAPI in insertStep Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add getPreviousStep API Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * more api Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * changes and refactor Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * now using this.getStep and related functions Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add getNextStep Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * minor refactor Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fix Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update getIndex Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
58a4798674
commit
1de72d7325
@@ -1,3 +1,5 @@
|
||||
const getStepUtils = require('./util/getStep.js');
|
||||
|
||||
// insert one or more steps at a given index in the sequencer
|
||||
function InsertStep(ref, image, index, name, o) {
|
||||
|
||||
@@ -22,10 +24,7 @@ function InsertStep(ref, image, index, name, o) {
|
||||
options: o
|
||||
};
|
||||
var UI = ref.events;
|
||||
this.getStep = function getStep(offset) {
|
||||
return ref.images[image].steps.slice(offset)[0];
|
||||
}
|
||||
var module = ref.modules[name][0].bind(this)(o, UI);
|
||||
var module = ref.modules[name][0](o, UI);
|
||||
ref.images[image].steps.splice(index, 0, module);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user