mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-10 10:20:00 +01:00
* add ranged input for overlay module * fix bug * change input type to integer * Add tests * Add tests Co-authored-by: Harsh Khandeparkar <34770591+HarshKhandeparkar@users.noreply.github.com> Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
20 lines
523 B
JavaScript
20 lines
523 B
JavaScript
module.exports = function OverlayModuleUi(step, ui) {
|
|
|
|
function setup() {
|
|
var steps = sequencer.getSteps();
|
|
steps.forEach(function (_step, index) {
|
|
if(_step.options && step.options.number === _step.options.number) {
|
|
if(index === 1){
|
|
step.ui.querySelector('input[type=range]').value = -1;
|
|
step.ui.querySelector('input[type=range]').min = -1;
|
|
}else
|
|
step.ui.querySelector('input[type=range]').min = -index;
|
|
}
|
|
});
|
|
}
|
|
|
|
return {
|
|
setup: setup
|
|
};
|
|
};
|