wavesjs / waves-ui

A library to display and edit audio data and timeseries data in the browser.
http://wavesjs.github.io/waves-ui/
BSD 3-Clause "New" or "Revised" License
122 stars 16 forks source link

Zoomer: split translation and zoom function #3

Closed thomasfillon closed 9 years ago

thomasfillon commented 9 years ago

It may be interesting to split the zooming behavior according to the user mouse movement.

Given the mouse movement _deltax, _deltay:

  1. if delta_x > delta_y, then only handle translation in the x-axis
  2. if delta_x < delta_y, then only handle zoom in or zoom out with a proper zoom factor around the anchor point

This should enable to solve #1easilly without side effects Case 2 could also be handle from mouse wheel event see #2

b-ma commented 9 years ago

Done ! see https://github.com/wavesjs/ui/releases/tag/1.0.0-alpha

thomasfillon commented 9 years ago

Great ! Merci beaucoup !