hotkeys to use key instead of a code

This commit is contained in:
Azgaar 2021-09-12 01:20:53 +03:00
parent b065b1a648
commit bedbb7cbff
4 changed files with 116 additions and 111 deletions

View file

@ -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]