faugh22k / RiverExplorer

Display river network; allow user to select different subnetworks, change budget. Display optimal solutions for maximizing habitat.
0 stars 0 forks source link

Pan through Mouse Drag #1

Closed faugh22k closed 9 years ago

faugh22k commented 9 years ago

This might be difficult to implement: Rapael appears not to allow the listener to go onto the "canvas" surface. As a result, the listener would probably need to go on the nodes and lines, which might not be desirable.

rjjkathy commented 9 years ago

1, tried adding transparent picture definitely doesn't work, because they block each other (picture and canvas) 2, added listener directly to canvas to listen to mouse events 3, used mousedown, mousemove, and mouseup in combo to make the drag

  1. there is a tiny bug when user drag out of canvas range and mouse up, it stays in dragging mode instead of stops, because canvas is unaware of the up event. 5, implement zoom through mouse scroll for fun...(but this blocked the page scroll up and down so we only use drag the side bar to scroll down now)
dsheldon commented 9 years ago

Cool, I'm excited to see this!

BTW, here is a good general procedure to follow: let's only close issues when there is also a commit to go along with the resolution.

You can link to the commit by putting a changeset id in the comment (like this: fb9bb9fa5a7c8e41f9f4180942e9c0749f68ae4f, even though it's not the right changeset).

rjjkathy commented 9 years ago

Changelist ID: 28f95cdabf718c808c4ae263688693177f5f60f1 Can you try on your machine when you get a chance? There is always the " it works on my machine " mystery ...