homotopy-io / homotopy-webclient

https://homotopy.io
27 stars 5 forks source link

Slice control needs to be navigable with a scroll wheel #27

Open jamievicary opened 6 years ago

jamievicary commented 6 years ago

I don't think the drop-down menu is ideal for the slice control. There may sometimes be hundreds of slices, so the list would be too long, and we want to be able to scroll through organically with a scroll wheel.

The same pressures don't apply for the projection control, since there will only be a small number of possible projection values, but for consistency it might make sense to make that work the same way as the slice control, so the user doesn't get confused about when she can use her scroll wheel and when she has to click.

A spinner would in principle be ideal for the slice control. The only problem is that we want to display 0, 0, 1, 1 etc, rather than an ordinary numeric sequence, and that confuses most spinner libraries.

NickHu commented 5 years ago

I added keyboard shortcuts "j" and "k" to move through the minor slice, and "p" and "P" to increase/decrease the projection

jamievicary commented 5 years ago

Very cool, thanks! That's going to be really helpful. Why not make an edit to the nLab page and add these keyboard shortcuts.

I do still think it would make sense to be able to do it with the mouse wheel, however, so let's keep this issue open for now. Maybe there's some easy way to just capture mouse wheel events when the cursor's hovering over a slice control?