mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
v 0.8.07b
This commit is contained in:
parent
e4df2842af
commit
13e1d94504
1 changed files with 7 additions and 2 deletions
|
|
@ -742,8 +742,13 @@ function changeDialogsTransparency(value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeZoomExtent(value) {
|
function changeZoomExtent(value) {
|
||||||
zoom.scaleExtent([+zoomExtentMin.value, +zoomExtentMax.value]);
|
const min = +zoomExtentMin.value;
|
||||||
|
zoom.scaleExtent([min, +zoomExtentMax.value]);
|
||||||
zoom.scaleTo(svg, +value);
|
zoom.scaleTo(svg, +value);
|
||||||
|
const x = min < 1 ? (graphWidth / min - graphWidth) / 2 : graphWidth * .2;
|
||||||
|
const y = min < 1 ? (graphHeight / min - graphHeight) / 2 : graphHeight * .2;
|
||||||
|
oceanPattern.select("rect").attr("x", -x).attr("y", -y).attr("width", graphWidth + 2 * x).attr("height", graphHeight + 2 * y);
|
||||||
|
oceanLayers.select("rect").attr("x", -x).attr("y", -y).attr("width", graphWidth + 2 * x).attr("height", graphHeight + 2 * y);
|
||||||
}
|
}
|
||||||
|
|
||||||
// control sroted options
|
// control sroted options
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue