thechiselgroup / biomixer

BioMixer
http://bio-mixer.appspot.com/
16 stars 13 forks source link

Add Zoom #490

Closed everbeek closed 9 years ago

everbeek commented 9 years ago

From #417, zoom.

everbeek commented 9 years ago

Merging the changes to master.

The zoom works great, and I will look into the semantic zoom as well. The Spacing slider in the menu will make use of semantic zoom, and perhaps the user can toggle zoom style for the mouse wheel.

There is a bug. When I drag a node, then drag the graph, it jumps. It is as though it has stored a delta movement during the node drag, but did not apply it, then applies it when the graph drag starts. I will look into it and fix it after the merge. [fixed]

I think I will add indicators for any nodes off screen, in a way that the music app I have indicates notes off screen (Caustic 3). Or perhaps not quite how that looks, it might be harder. Instead, I can add some arrow icons that point off screen in the direction of any nodes that are off screen (4 arrows, one per side of the view, or maybe 8 with diagonals).

I also would like to change the mouse to look like a four-way arrow drag when over the white space.

I will also see if there is an existing solution for a thumbnail view, like I implemented in Meerkat. It might take took much time to implement this from scratch, in the case that I can't find a ready made solution. (Oh, see this http://www.billdwhite.com/wordpress/2014/02/03/d3-pan-and-zoom-reuse-demo/ and this http://norkart.github.io/Leaflet-MiniMap/example.html, no wait, this is exactly what I need: http://codepen.io/billdwhite/pen/yyedWq)

When nodes are off screen, the tour must adapt (it should bring the graph to be centered, and perhaps unzoomed when that happens). Also, I need to add tour steps for zooming.

I also want to make it so that whenever a layout is triggered it re-centers the graph in the view port.[fixed]

everbeek commented 9 years ago

Still working on a minimap to give zoom and pan awareness. Currently dealing with a problem where zoom is disabled when the minimap is rendered at all. Also, I do not yet have the graph rendering in the minimap, but I do have the elements showing up.

Sorted some out, but still don't have zoom working when minimap is present, and the cloning is not working. I might need to use the exact technique that I used for printscreen in the minimap.

everbeek commented 9 years ago

I'm having browser issues with this minimap...I think I want to cut my losses and go back to the notion of having arrows pointing off screen whenever there are nodes in said direction, and showing a zoom percentage...I will decide when I pick up tomorrow.

everbeek commented 9 years ago

Still continuing with this, and sorting out an issue with the viewbox changing when I don't want it to.

everbeek commented 9 years ago

Minimap working well now. I need to fix some problems with the container cropping smaller than we need occasionally. I also want to activate zoom in that panel, though it's not vital. Drag works there, and the rectangle frame looks nice, and behaves perfectly now.

everbeek commented 9 years ago

Minimap has problems in IE and Firefox when it is off screen (when the menu is closed). I am doing a try/catch, since there is no other good solution. It is a known browser failing: https://bugzilla.mozilla.org/show_bug.cgi?id=612118

everbeek commented 9 years ago

Dragging in FF is super chunky, and IE panning leads to the menu being covered by svg. IE panning is not chunky, and FF panning does not cover the menu bar. I love browsers.

everbeek commented 9 years ago

FF chunky, and when graphs are still laying out, if the minimap is dragged, it moves the graph around and possibly off screen.

Trying to fix the minimap drag problem by changing the main graph viewbox instead of the graph elements transform within it. This fixes the problem, but introduces some bugs. I am trying to fix those, in hopes I can use this approach.

Oh, excellent! It was a browser problem. I have observed before, and learned to deal with, weird mouse problems in Chrome. Sometimes panning stops occurring, and I cannot fix it except by making a new tab. This was the same phenomenon. It is as though code for mouse events gets stuck in the tab's memory, and leads to malfunctions.

Ok, now that I know that Chrome was sabotaging me, I can continue trying this approach.

everbeek commented 9 years ago

Now preventing user interaction with minimap while layouts run.

When I zoom, it still affects the space that the minimap takes up (in a non-zoom way...changed view margins somehow).

FF is still chunky too.

everbeek commented 9 years ago

Fixed zoom spacing. I don't like that the minimap rendering leads to stuttering. I should either have it happen at greater intervals, or see if I can hack some speed out of it.

Also, nodes can be dragged out of the minimap. Is that ok maybe?

FF is still chunky to.

everbeek commented 9 years ago

FF chunky, nodes drag out, but new bug is that if I don't open the menu while the default layout is running, it doesn't appear until I have changed layouts and mouse over it. Very odd. Ah, the viewbox doesn't get set properly, I can see that much. Fixing...

everbeek commented 9 years ago

That leaves nodes dragging out of minimap, and FF chunkiness.

I have no hints for the sluggishness of FF. IE runs it much better, and Chrome is fine. Hmmm...oh, odd! I had the debugger open, closed it, and things got much quicker. I reopened the debugger, and they stayed fast. I'm chaulking this up to solar flares and ghosts. Or debugger bugginess.