mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
rough implementation of empty function to load csv for rivers
This commit is contained in:
parent
f73a8906ce
commit
af4bca601c
2 changed files with 19 additions and 1 deletions
|
|
@ -5462,6 +5462,7 @@
|
|||
class="icon-plus"
|
||||
></button>
|
||||
<button id="riverCreateNew" data-tip="Create a new river selecting river cells" class="icon-map-pin"></button>
|
||||
<button id="loadriverfromcsv" data-tip="Generate river from csv" class="icon-upload"></button>
|
||||
<button id="riversBasinHighlight" data-tip="Toggle basin highlight mode" class="icon-sitemap"></button>
|
||||
<button
|
||||
id="riversExport"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ function overviewRivers() {
|
|||
document.getElementById("riversBasinHighlight").addEventListener("click", toggleBasinsHightlight);
|
||||
document.getElementById("riversExport").addEventListener("click", downloadRiversData);
|
||||
document.getElementById("riversRemoveAll").addEventListener("click", triggerAllRiversRemove);
|
||||
document.getElementById("loadriverfromcsv").addEventListener("click", loadriverfromcsvfunction);
|
||||
|
||||
// add line for each river
|
||||
function riversOverviewAddLines() {
|
||||
|
|
@ -178,7 +179,7 @@ function overviewRivers() {
|
|||
});
|
||||
}
|
||||
|
||||
function triggerAllRiversRemove() {
|
||||
function removeAllRivers() {
|
||||
alertMessage.innerHTML = /* html */ `Are you sure you want to remove all rivers?`;
|
||||
$("#alert").dialog({
|
||||
resizable: false,
|
||||
|
|
@ -201,4 +202,20 @@ function overviewRivers() {
|
|||
rivers.selectAll("*").remove();
|
||||
riversOverviewAddLines();
|
||||
}
|
||||
|
||||
function loadriverfromcsvfunction() {
|
||||
alertMessage.innerHTML = /* html */ `Are you sure you want to add river from csv?`;
|
||||
$("#alert").dialog({
|
||||
resizable: false,
|
||||
title: "Import rivers",
|
||||
buttons: {
|
||||
Remove: function() {
|
||||
$(this).dialog("close");
|
||||
},
|
||||
Cancel: function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue