mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
Merge branch 'master' of https://github.com/Azgaar/Fantasy-Map-Generator into submap-refactoring
This commit is contained in:
commit
d19aae59c8
12 changed files with 191 additions and 151 deletions
|
|
@ -608,7 +608,7 @@ function overviewBurgs(settings = {stateId: null, cultureId: null}) {
|
|||
const activeBurgs = pack.burgs.filter(b => b.i && !b.removed);
|
||||
const allLocked = activeBurgs.every(burg => burg.lock);
|
||||
|
||||
pack.burgs.forEach(burg => {
|
||||
activeBurgs.forEach(burg => {
|
||||
burg.lock = !allLocked;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ function editLabel() {
|
|||
|
||||
function redrawLabelPath() {
|
||||
const path = byId("textPath_" + elSelected.attr("id"));
|
||||
lineGen.curve(d3.curveBundle.beta(1));
|
||||
lineGen.curve(d3.curveNatural);
|
||||
const points = [];
|
||||
debug
|
||||
.select("#controlPoints")
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function editLake() {
|
|||
debug.append("g").attr("id", "vertices");
|
||||
elSelected = d3.select(node);
|
||||
updateLakeValues();
|
||||
selectLakeGroup(node);
|
||||
selectLakeGroup();
|
||||
drawLakeVertices();
|
||||
viewbox.on("touchmove mousemove", null);
|
||||
|
||||
|
|
@ -140,13 +140,13 @@ function editLake() {
|
|||
lake.name = lakeName.value = Names.getBase(rand(nameBases.length - 1));
|
||||
}
|
||||
|
||||
function selectLakeGroup(node) {
|
||||
const group = node.parentNode.id;
|
||||
function selectLakeGroup() {
|
||||
const lake = getLake();
|
||||
|
||||
const select = byId("lakeGroup");
|
||||
select.options.length = 0; // remove all options
|
||||
|
||||
lakes.selectAll("g").each(function () {
|
||||
select.options.add(new Option(this.id, this.id, false, this.id === group));
|
||||
select.options.add(new Option(this.id, this.id, false, this.id === lake.group));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -341,6 +341,8 @@ function editZones() {
|
|||
}
|
||||
|
||||
function toggleLegend() {
|
||||
if (legend.selectAll("*").size()) return clearLegend(); // hide legend
|
||||
|
||||
const filterBy = byId("zonesFilterType").value;
|
||||
const isFiltered = filterBy && filterBy !== "all";
|
||||
const visibleZones = pack.zones.filter(zone => !zone.hidden && (!isFiltered || zone.type === filterBy));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue