Skip to content

Commit

Permalink
move to next tab after filing file
Browse files Browse the repository at this point in the history
  • Loading branch information
vncoelho committed Nov 21, 2023
1 parent ed19202 commit 7f7fd38
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions assets/eco-scripts/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ function getFiles(language, selected_index, index = 0) {
var file = vExamples[selected_index][index];
$.get(file, function (data) {
aceEditor.getSession().setValue(aceEditor.getSession().getValue() + data);
//tab has been filled - move to main as default
goToACEMainTab();

//Is there any next file to be obtained?
if (numfiles > 1 && index < (numfiles - 1)) {
index++;
var nextFile = vExamples[selected_index][index];
Expand All @@ -337,10 +341,8 @@ function getFiles(language, selected_index, index = 0) {
// Move to tab to simulate click and activate as current session
var nameToClick = "#textChildAce" + (Editor.tabs - 1);
$(nameToClick).click();

getFiles(language, selected_index, index);
}
goToACEMainTab();
}
});
}
}
Expand Down

0 comments on commit 7f7fd38

Please sign in to comment.