mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-12 03:10:03 +01:00
Run optimize (#275)
* fixes #269 Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update demo Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * refactor and comments Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update readme Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * updated and refactored Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update readme Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * trying to fix tests Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update documentation Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update to config.mode = test Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * finaly everything works Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * 1.8.0 * update test Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add test for run Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
a0f7e6c766
commit
10c6ad5865
@@ -15,7 +15,7 @@ function DefaultHtmlSequencerUi(_sequencer, options) {
|
||||
|
||||
if (hash) {
|
||||
_sequencer.importString(hash);
|
||||
_sequencer.run();
|
||||
_sequencer.run({index:0});
|
||||
}
|
||||
setUrlHashParameter("steps", sequencer.toString());
|
||||
}
|
||||
@@ -27,7 +27,7 @@ function DefaultHtmlSequencerUi(_sequencer, options) {
|
||||
|
||||
function removeStepUi() {
|
||||
var index = $(removeStepSel).index(this) + 1;
|
||||
sequencer.removeSteps(index).run();
|
||||
sequencer.removeSteps(index).run({index : sequencer.images.image1.steps.length-1});
|
||||
// remove from URL hash too
|
||||
setUrlHashParameter("steps", sequencer.toString());
|
||||
}
|
||||
@@ -36,9 +36,15 @@ function DefaultHtmlSequencerUi(_sequencer, options) {
|
||||
if ($(addStepSel + " select").val() == "none") return;
|
||||
|
||||
var newStepName = $(addStepSel + " select").val();
|
||||
|
||||
/*
|
||||
* after adding the step we run the sequencer from defined step
|
||||
* and since loadImage is not a part of the drawarray the step lies at current
|
||||
* length - 2 of the drawarray
|
||||
*/
|
||||
_sequencer
|
||||
.addSteps(newStepName, options)
|
||||
.run(null);
|
||||
.run({index: _sequencer.images.image1.steps.length - 2});
|
||||
|
||||
// add to URL hash too
|
||||
setUrlHashParameter("steps", _sequencer.toString());
|
||||
|
||||
@@ -101,7 +101,8 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
||||
.each(function(i, input) {
|
||||
step.options[$(input).attr("name")] = input.value;
|
||||
});
|
||||
_sequencer.run();
|
||||
_sequencer.run({index: _sequencer.images.image1.steps.length - 2});
|
||||
|
||||
// modify the url hash
|
||||
setUrlHashParameter("steps", _sequencer.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user