mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
chore: clean up
This commit is contained in:
parent
a1f70afd57
commit
54721f2100
1 changed files with 1 additions and 3 deletions
|
|
@ -180,7 +180,6 @@ function mapSizeInputChange() {
|
||||||
|
|
||||||
// on map creation
|
// on map creation
|
||||||
function applyGraphSize() {
|
function applyGraphSize() {
|
||||||
console.log("applyGraphSize");
|
|
||||||
graphWidth = +mapWidthInput.value;
|
graphWidth = +mapWidthInput.value;
|
||||||
graphHeight = +mapHeightInput.value;
|
graphHeight = +mapHeightInput.value;
|
||||||
|
|
||||||
|
|
@ -194,7 +193,6 @@ function applyGraphSize() {
|
||||||
|
|
||||||
// on generate, on load, on resize, on canvas size change
|
// on generate, on load, on resize, on canvas size change
|
||||||
function fitMapToScreen() {
|
function fitMapToScreen() {
|
||||||
console.log("fitMapToScreen");
|
|
||||||
svgWidth = Math.min(+mapWidthInput.value, window.innerWidth);
|
svgWidth = Math.min(+mapWidthInput.value, window.innerWidth);
|
||||||
svgHeight = Math.min(+mapHeightInput.value, window.innerHeight);
|
svgHeight = Math.min(+mapHeightInput.value, window.innerHeight);
|
||||||
svg.attr("width", svgWidth).attr("height", svgHeight);
|
svg.attr("width", svgWidth).attr("height", svgHeight);
|
||||||
|
|
@ -204,7 +202,7 @@ function fitMapToScreen() {
|
||||||
[graphWidth, graphHeight]
|
[graphWidth, graphHeight]
|
||||||
];
|
];
|
||||||
|
|
||||||
const zoomMin = rn(Math.max(svgWidth / graphWidth, svgHeight / graphHeight), 2);
|
const zoomMin = rn(Math.max(svgWidth / graphWidth, svgHeight / graphHeight), 3);
|
||||||
zoomExtentMin.value = zoomMin;
|
zoomExtentMin.value = zoomMin;
|
||||||
const zoomMax = +zoomExtentMax.value;
|
const zoomMax = +zoomExtentMax.value;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue