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

@@ -213,14 +213,6 @@ class NativeMapView {
return nativeGetLatLng(mNativeMapViewPtr);
}
public void startPanning() {
nativeStartPanning(mNativeMapViewPtr);
}
public void stopPanning() {
nativeStopPanning(mNativeMapViewPtr);
}
public void resetPosition() {
nativeResetPosition(mNativeMapViewPtr);
}
@@ -281,14 +273,6 @@ class NativeMapView {
nativeResetZoom(mNativeMapViewPtr);
}
public void startScaling() {
nativeStartScaling(mNativeMapViewPtr);
}
public void stopScaling() {
nativeStopScaling(mNativeMapViewPtr);
}
public double getMinZoom() {
return nativeGetMinZoom(mNativeMapViewPtr);
}
@@ -326,14 +310,6 @@ class NativeMapView {
nativeResetNorth(mNativeMapViewPtr);
}
public void startRotating() {
nativeStartRotating(mNativeMapViewPtr);
}
public void stopRotating() {
nativeStopRotating(mNativeMapViewPtr);
}
public void setDebug(boolean debug) {
nativeSetDebug(mNativeMapViewPtr, debug);
}
@@ -468,10 +444,6 @@ class NativeMapView {
private native LatLng nativeGetLatLng(long nativeMapViewPtr);
private native void nativeStartPanning(long nativeMapViewPtr);
private native void nativeStopPanning(long nativeMapViewPtr);
private native void nativeResetPosition(long nativeMapViewPtr);
private native void nativeScaleBy(long nativeMapViewPtr, double ds,
@@ -494,10 +466,6 @@ class NativeMapView {
private native void nativeResetZoom(long nativeMapViewPtr);
private native void nativeStartScaling(long nativeMapViewPtr);
private native void nativeStopScaling(long nativeMapViewPtr);
private native double nativeGetMinZoom(long nativeMapViewPtr);
private native double nativeGetMaxZoom(long nativeMapViewPtr);
@@ -515,10 +483,6 @@ class NativeMapView {
private native void nativeResetNorth(long nativeMapViewPtr);
private native void nativeStartRotating(long nativeMapViewPtr);
private native void nativeStopRotating(long nativeMapViewPtr);
private native void nativeSetDebug(long nativeMapViewPtr, boolean debug);
private native void nativeToggleDebug(long nativeMapViewPtr);