OneZoom / OZtree

OneZoom Tree of Life Explorer
Other
88 stars 19 forks source link

Improved fine-scale zooming #382

Closed hyanwong closed 2 years ago

hyanwong commented 3 years ago

At the moment it is difficult to control the zooming increment in order to get an exact level of zoom. It would be really useful to be able to make much smaller adjustments in the amount of zoom. We could do this in the "old style" way by making finer zoom increments when a modifier key is held down (which could apply when both when clicking on the zoom button and when mouse zooming), or we could do some quadratic movement-like thing, so that small zoom gestures have very small effects on the zoom level.

I wonder if this is linked to #381? In particular, I see that the pinch zooming functionality in chrome using google maps can create very fine adjustments in the amount of zoom, when small pinch movements are made. It would be fantastic if we could replicate the chrome+google maps zoom behaviour in OneZoom, and would be definitely worth spending a little more of @lentinj 's time on (perhaps paying another day's time if there's no time left after implementing the renewals stuff).

jrosindell commented 3 years ago

Agreed. The only thing that slightly bothers me is how intuitive it is to users that this be done with a modifier key.

Alternatives would be new logic that looks at the frequency of and direction of scroll actions and/or an option in settings to turn on fine control.

lentinj commented 3 years ago

Obviously given the whole tree is a generated vector there's no theoretical need for stepped zoom, and I don't think it'd be that hard to naively add. But the stepped zoom is masking several performance problems (again, from memory so I could be out of date).

A 2-stage process of generating a larger vector to then zoom-pan, then regenerating this in the background rebased on the new location could be a way forward with the former, but would be a relatively big change.

hyanwong commented 3 years ago

I like your use of the word "agricultural"! Presumably a modifier key would be a relatively easy hack here? I'm not quite as against that idea as James, as I think it's a rather minor use-case.

I do think some sort of pinch-zooming would be good though, and it does currently work OK on a touch screen, so I imagine it should be OK on a trackpad?

lentinj commented 3 years ago

Yeah, that's very easy. We just change the sensitivity in interactor/mouse.js if shift (or whatever) is held down.

I'm with you too, sure it's not very discoverable but I don't think we care. If we want something more natural for users then we do the pinch-zooming. It can be documented on the screenshot tool page, which is probably the most obvious use-case.

hyanwong commented 3 years ago

Yeah, that's very easy. We just change the sensitivity in interactor/mouse.js if shift (or whatever) is held down.

It might be nice to change something about the visual presentation of the + or - buttons when shift is down to indicate that the behaviour is a little different - e.g. make the symbols smaller, or something.

jrosindell commented 2 years ago

How about a modifier key and a button that only appears in the UI of the screenshot tool. The button should behave like a tick box i.e. click to turn on and click to turn off. I'd suggest the modifier key work on all versions of the tree, but the visible button only be there on the screenshot tool. I'd suggest shift as the modifier button.

Whilst I'm on this, another really useful thing for the screenshot tool would be a button to boost the tree detail and redraw a single frame. I'm talking about the level of iteration of the fractal algorithm before we draw a fake leaf. I think screenshots would look much nicer if this be turned down to 1 pixel or something like that. I'd suggest a modifier key (e.g. shift and D for detail) that works everywhere and a visible button only on the screenshot tool.

lentinj commented 2 years ago

The above does this. Hold down ctrl (you may have to click the treeviewer to make sure that's where the focus is), the + and - buttons shrink, and sensitivity for zoom and button presses is turned right up.

However, this.zoomout_anim seems to be buggy and ignores the zoom_sensitivity. Haven't worked out why yet.

lentinj commented 2 years ago

I falsely accused zoomout_anim in the above. It works fine, the problem is the "-" doesn't zoom out, it zooms up.

The above switches to zooming out when in fine-grained mode.