Skip to content

Commit

Permalink
Merge pull request #3114 from AnalyticalGraphicsInc/inertia
Browse files Browse the repository at this point in the history
Stop slow Camera inertia
  • Loading branch information
pjcozzi committed Oct 21, 2015
2 parents ebab05f + ddc1286 commit ccd8d28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Change Log
* Added `BoxOutlineGeometry.fromAxisAlignedBoundingBox` and `BoxGeometry.fromAxisAlignedBoundingBox` functions.
* The WebGL setting of `failIfMajorPerformanceCaveat` now defaults to `false`, which is the official WebGL default. This improves compatibility with out-of-date drivers and remote desktop sessions. Cesium will run slower in these cases instead of simply failing to load.
* Changed `Camera.setView` to take the same parameter options as `Camera.flyTo`. `options.destination` takes a rectangle, `options.orientation` works with heading/pitch/roll or direction/up, and `options.endTransform` was added.
* Fixed the issue where the camera inertia takes too long to finish causing the camera move events to fire after it appears to. [2839](https://github.com/AnalyticalGraphicsInc/cesium/issues/2839)

### 1.14 - 2015-10-01

Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/ScreenSpaceCameraController.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ define([

// If value from the decreasing exponential function is close to zero,
// the end coordinates may be NaN.
if (isNaN(movementState.endPosition.x) || isNaN(movementState.endPosition.y) || sameMousePosition(movementState)) {
if (isNaN(movementState.endPosition.x) || isNaN(movementState.endPosition.y) || Cartesian2.distance(movementState.startPosition, movementState.endPosition) < 0.5) {
movementState.active = false;
return;
}
Expand Down

0 comments on commit ccd8d28

Please sign in to comment.