Mike 10.24.2011

  • Started working on zoomable charts based on hints from amCharts
  • The first thing I did was write a helper class for panning gestures: ScrollTouchHelper
    • This class can monitor a UIComponent for Pan gestures
    • The UIComponent must implement performDrag(x,y) and performThrow(vx, vy)
    • The helper class takes care of all of the event listeners, delta calculations, etc. and leaves the component itself to implement how the changes in x and y take effect
    • The helper class works with both gesture events and mouse events
  • Next I tackled zooming which is much simpler.
    • Just add event listeners for MouseEvent.MOUSE_WHEEL and TransformGestureEvent.GESTURE_ZOOM and handle the changes