rockholla/org-rockholla-flex — pull request #26 by ravimalik20 (2014-11-19 12:48:50+00:00)
Title: PanZoom fixes and panning enable/disable feature

Issues Fixed in Pull Request:

1. #24 : Restricting panning area to the height-width of
the PanZoomComponent
This is achieved by restricting the mouse pointer
to the set height-width of PanZoomComponent in
function _onMouseDownMove.

2. #9 : MouseWheel Zoom fixes. Mouse cursor remains on the
content
In the current application, the content to be zoomed
was moved to the centre of the viewable area. Hence we
can calculate the difference of the current mouse
pointer from the centre. The distance is calculated
with respect to the stage. This being the excess distance
travelled by the content. The value is adjusted and
passed to the tweening tool.

Current mouse location wrt. stage is fetched in function
_onMouseWheel. This value is passed on to the zoom
function via. the zoomDirectional function. Here the
extra distance is calculated and adjusted with the
values passed to the tweening tool.

It may seem that the interface is broken and it breaks
backward compatibility, but it's not. The extra
parameters passed in the function have default values
and to ensure backward compatibility, just ignore that
there are extra values.

New Feature Added:

1. #25 : Enable/Disable Panning
A bindable variable is created in the PanZoomComponent
which can be set in mxml, as well as as3 and even at
runtime. All the necessary event listeners are attached
and removed when the value to that bindable variable
is set (via. set method)