mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
refactor: submap - recalculateMapSize
This commit is contained in:
parent
499762f1bb
commit
1305246d7b
5 changed files with 46 additions and 25 deletions
8
main.js
8
main.js
|
|
@ -495,14 +495,6 @@ function resetZoom(d = 1000) {
|
|||
svg.transition().duration(d).call(zoom.transform, d3.zoomIdentity);
|
||||
}
|
||||
|
||||
// calculate x y extreme points of viewBox
|
||||
function getViewBoxExtent() {
|
||||
return [
|
||||
[Math.abs(viewX / scale), Math.abs(viewY / scale)],
|
||||
[Math.abs(viewX / scale) + graphWidth / scale, Math.abs(viewY / scale) + graphHeight / scale]
|
||||
];
|
||||
}
|
||||
|
||||
// active zooming feature
|
||||
function invokeActiveZooming() {
|
||||
const isOptimized = shapeRendering.value === "optimizeSpeed";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue