mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
Redraw emblems after resample & remove aspect change. (#773)
* Redraw emblems after resample. * Remove aspect change feature on submaps to support more useful crop operation. Co-authored-by: Mészáros Gergely <monk@geotronic.hu>
This commit is contained in:
parent
0408893db3
commit
0a406686f1
2 changed files with 5 additions and 2 deletions
|
|
@ -310,6 +310,8 @@ window.Submap = (function () {
|
||||||
}
|
}
|
||||||
drawMarkers();
|
drawMarkers();
|
||||||
|
|
||||||
|
stage("Redraw emblems.");
|
||||||
|
drawEmblems();
|
||||||
stage("Regenerating Zones.");
|
stage("Regenerating Zones.");
|
||||||
addZones();
|
addZones();
|
||||||
Names.getMapName();
|
Names.getMapName();
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ const generateSubmap = debounce(function () {
|
||||||
const checked = id => Boolean(document.getElementById(id).checked);
|
const checked = id => Boolean(document.getElementById(id).checked);
|
||||||
// Create projection func from current zoom extents
|
// Create projection func from current zoom extents
|
||||||
const [[x0, y0], [x1, y1]] = getViewBoxExtent();
|
const [[x0, y0], [x1, y1]] = getViewBoxExtent();
|
||||||
|
const origScale = scale;
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
lockMarkers: checked("submapLockMarkers"),
|
lockMarkers: checked("submapLockMarkers"),
|
||||||
|
|
@ -85,8 +86,8 @@ const generateSubmap = debounce(function () {
|
||||||
addLakesInDepressions: checked("submapAddLakeInDepression"),
|
addLakesInDepressions: checked("submapAddLakeInDepression"),
|
||||||
promoteTowns: checked("submapPromoteTowns"),
|
promoteTowns: checked("submapPromoteTowns"),
|
||||||
smoothHeightMap: scale > 2,
|
smoothHeightMap: scale > 2,
|
||||||
inverse: (x, y) => [(x * (x1 - x0)) / graphWidth + x0, (y * (y1 - y0)) / graphHeight + y0],
|
inverse: (x, y) => [x / origScale + x0, y / origScale + y0],
|
||||||
projection: (x, y) => [((x - x0) * graphWidth) / (x1 - x0), ((y - y0) * graphHeight) / (y1 - y0)]
|
projection: (x, y) => [(x - x0) * origScale, (y - y0) * origScale],
|
||||||
};
|
};
|
||||||
|
|
||||||
// converting map position on the planet
|
// converting map position on the planet
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue