Rework easing transition code

This brings the easing transition code a bit closer to how easings work
in gl-js. Instead of having an array of individual transitions for scale,
rotate, and pan, there is a single transition function that does all the
required calculations. This permits us to:

* Eliminate the "timeout" transition. (Fixes #126)
* Replace start/stopPanning() et al with setGestureInProgress(). Apps or
  SDKs are expected to make paired calls to setGestureInProgress(). This
  state will be ORed with the active easing state to determine when to
  use texture interpolation. (Fixes #79)
* Run style recalculations only when an ease transition that affects the
  zoom is in progress. (Fixes #1155)
This commit is contained in:
John Firebaugh
2015-04-01 13:49:35 -07:00
parent 9e38d7cc2b
commit 12c07b916b
11 changed files with 154 additions and 287 deletions

View File

@@ -249,7 +249,7 @@ const LatLng TransformState::latLngForPixel(const vec2<double> pixel) const {
#pragma mark - Changing
bool TransformState::isChanging() const {
return rotating || scaling || panning;
return rotating || scaling || panning || gestureInProgress;
}