Animated zoom in/out with only the border of the selected area, without repainting the whole matrix

Issue #226 closed
Anastasia Baryshnikova created an issue

To increase the perceived smoothness of the zoom in/out to selection, we can try to avoid painting the whole matrix at every step, but gradually increase/decrease just the size of its boundary.

Comments (5)

  1. Robert Leach

    Resolved issue #226. Repainting just the selection did not make it any faster, so I made some adjustments and fixed a bug I found that affected the number of zoom increments upon zoom out.

    I changed the calculation of the zoom step fraction to skip fractions when the next fraction in the next step would end up being the same (this was an estimate).

    I also maxed out the zoom step (a fraction of 1) when the remaining step was marginal compared to the current step - only for zooming out.

    I adjusted the calculation of the zoom step fraction to be based on the size of the area that will be drawn instead of on the size of the current area. I made a similar adjustment to the calculation that translates that fraction into a number of rows/cols.

    I also fixed a bug that mis-calculated the full zoom out when getting the zoomVal from both getBestZoomInVal and getBestZoomOutVal. They were returning a value 1 less than the full size. There was another bug I fixed that was returning a zoomVal of 1 when the zoomFrac was 1.0.

    → <<cset 0c8aab9232dd>>

  2. Log in to comment