mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
hotkeys to use key instead of a code
This commit is contained in:
parent
b065b1a648
commit
bedbb7cbff
4 changed files with 116 additions and 111 deletions
4
main.js
4
main.js
|
|
@ -437,10 +437,8 @@ function resetZoom(d = 1000) {
|
|||
svg.transition().duration(d).call(zoom.transform, d3.zoomIdentity);
|
||||
}
|
||||
|
||||
// calculate x,y extreme points of viewBox
|
||||
// calculate x y extreme points of viewBox
|
||||
function getViewBoxExtent() {
|
||||
// x = trX / scale * -1 + graphWidth / scale
|
||||
// y = trY / scale * -1 + graphHeight / scale
|
||||
return [
|
||||
[Math.abs(viewX / scale), Math.abs(viewY / scale)],
|
||||
[Math.abs(viewX / scale) + graphWidth / scale, Math.abs(viewY / scale) + graphHeight / scale]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue