mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
Add step butoon disabled for last step
This commit is contained in:
@@ -173,6 +173,9 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
|||||||
// Insert the step's UI in the right place
|
// Insert the step's UI in the right place
|
||||||
if (stepOptions.index == _sequencer.images.image1.steps.length) {
|
if (stepOptions.index == _sequencer.images.image1.steps.length) {
|
||||||
stepsEl.appendChild(step.ui);
|
stepsEl.appendChild(step.ui);
|
||||||
|
$("#steps .container:nth-last-child(1) .insert-step").prop('disabled',true);
|
||||||
|
if($("#steps .container:nth-last-child(2)"))
|
||||||
|
$("#steps .container:nth-last-child(2) .insert-step").prop('disabled',false);
|
||||||
} else {
|
} else {
|
||||||
stepsEl.insertBefore(step.ui, $(stepsEl).children()[stepOptions.index]);
|
stepsEl.insertBefore(step.ui, $(stepsEl).children()[stepOptions.index]);
|
||||||
}
|
}
|
||||||
@@ -238,6 +241,7 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
|||||||
|
|
||||||
function onRemove(step) {
|
function onRemove(step) {
|
||||||
step.ui.remove();
|
step.ui.remove();
|
||||||
|
$("#steps .container:nth-last-child(1) .insert-step").prop('disabled',true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPreview() {
|
function getPreview() {
|
||||||
|
|||||||
Reference in New Issue
Block a user