Add step butoon disabled for last step

This commit is contained in:
divy123
2018-12-17 16:02:32 +05:30
parent 327b421284
commit 6bab70ad09

View File

@@ -173,6 +173,9 @@ function DefaultHtmlStepUi(_sequencer, options) {
// Insert the step's UI in the right place
if (stepOptions.index == _sequencer.images.image1.steps.length) {
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 {
stepsEl.insertBefore(step.ui, $(stepsEl).children()[stepOptions.index]);
}
@@ -238,6 +241,7 @@ function DefaultHtmlStepUi(_sequencer, options) {
function onRemove(step) {
step.ui.remove();
$("#steps .container:nth-last-child(1) .insert-step").prop('disabled',true);
}
function getPreview() {