Commit 5eb4d101 authored by Andrew Danger Lyon's avatar Andrew Danger Lyon

adding keyboar dshortcut (0) to reset zoom/pan

parent fca7a92d
......@@ -37,6 +37,14 @@ module.exports = function Vizz(options) {
zoom *= dir;
apply_svg_transform();
}, false);
document.addEventListener('keydown', function(e) {
if(e.key == '0') {
x = width / 2;
y = height / 2;
zoom = 1.0;
apply_svg_transform();
}
}, false);
const pan_dragger = d3.drag()
.on('drag', function() {
const e = d3.event;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment