mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
Changes to make the insert-step disable at the first step (#968)
This commit is contained in:
committed by
Jeffrey Warren
parent
690c126f41
commit
985c67847e
@@ -150,9 +150,9 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
||||
// Insert the step's UI in the right place
|
||||
if (stepOptions.index == _sequencer.steps.length) {
|
||||
stepsEl.appendChild(step.ui);
|
||||
$("#steps .main:nth-last-child(1) .insert-step").prop('disabled',true);
|
||||
if($("#steps .main:nth-last-child(2)"))
|
||||
$("#steps .main:nth-last-child(2) .insert-step").prop('disabled',false);
|
||||
$("#steps .step-container:nth-last-child(1) .insert-step").prop('disabled',true);
|
||||
if($("#steps .step-container:nth-last-child(2)"))
|
||||
$("#steps .step-container:nth-last-child(2) .insert-step").prop('disabled',false);
|
||||
} else {
|
||||
stepsEl.insertBefore(step.ui, $(stepsEl).children()[stepOptions.index]);
|
||||
}
|
||||
@@ -301,7 +301,7 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
||||
|
||||
function onRemove(step) {
|
||||
step.ui.remove();
|
||||
$("#steps .main:nth-last-child(1) .insert-step").prop('disabled',true);
|
||||
$("#steps .step-container:nth-last-child(1) .insert-step").prop('disabled',true);
|
||||
$('div[class*=imgareaselect-]').remove();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user