Closed trengrj closed 10 years ago
I found double-clicking nice, but I can't zoom using the mouse any more.
@nawroth Are you running ubuntu unity?
@trengrj Yes I am. Forgot to say that and that it was in Chrome.
@nawroth I've added two more events. Unfortunately in d3.js there seems no way to cleanly disable and then reenable zoom.behavior functionality: https://github.com/mbostock/d3/issues/894
I don't see any difference. Does it matter that I actually use a touchpad with two-finger-scroll? Worked previously. And doesn't work in Chrome or Firefox using this PR.
That could be the issue. I've added touch* events which I thought were for mobile devices.
With unity you may need to hold down Ctrl+Alt then two finger zoom as unity intercepts the Alt key.
No change, doesn't work in Chrome (Ctrl+Alt triggers page zoom) or Firefox (triggers nothing). I wonder why it worked before!
I messed up a bit when testing it seems. Zoom now works in Chrome under Ubuntu, but not in Firefox!
Changing to accept both Alt and Shift keys: d3.event.altKey || d3.event.shiftKey
I get the following result:
In Chrome I can pan with Shift, and zoom using Alt.
In Firefox I can pan and zoom with Shift.
Any disadvantages with adding that?
What about panning the whole image with a transform when clicking on the blank background? Would that work too?
@trengrj I added this: https://github.com/neo4j-contrib/graphgist/commit/b098399e305dcb21fc27f648d63c6c9fb74348a7 We'll see if it blows up in some browser.
@nawroth adding the optional shift key was a good idea! I'll try to do some testing on an ubuntu machine and see if I can isolate the issue.
This should fix the panning issues and also the ".on" errors that were coming up before.
I'm not sure what to do with things like double click zooming and touches. I've enabled them for now but check out if this behaviour is what you want.