Skip to content

Commit

Permalink
Merge pull request #4982 from AnalyticalGraphicsInc/zoom-auto-reset
Browse files Browse the repository at this point in the history
Auto-reset the zoom after zooming past a target.
  • Loading branch information
pjcozzi authored Feb 10, 2017
2 parents 65a94d5 + 08adff8 commit 4bcc68f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ Change Log
==========

### 1.31 - 2017-03-01

* Deprecated
* `ArcGisImageServerTerrainProvider` will be removed in 1.32 due to missing TIFF support in web browsers.
* `ArcGisImageServerTerrainProvider` will be removed in 1.32 due to missing TIFF support in web browsers.
* Breaking changes
* Corrected spelling of `Color.FUCHSIA` from `Color.FUSCHIA`
* Corrected spelling of `Color.FUCHSIA` from `Color.FUSCHIA`. [#4977](https://github.com/AnalyticalGraphicsInc/cesium/pull/4977)
* Added support to `DebugCameraPrimitive` to draw multifrustum planes. The attribute `debugShowFrustumPlanes` of `Scene` and `frustumPlanes` of `CesiumInspector` toggles this. `FrameState` has been augmented to include `frustumSplits` which is a `Number[]` of the near/far planes of the camera frustums.
* Enable rendering `GroundPrimitives` on hardware without the `EXT_frag_depth` extension; however, this could cause artifacts for certain viewing angles.
* Added compressed texture support. [#4758](https://github.com/AnalyticalGraphicsInc/cesium/pull/4758)
Expand All @@ -14,6 +15,7 @@ Change Log
* Added new `PixelFormat` and `WebGLConstants` enums from WebGL extensions `WEBGL_compressed_s3tc`, `WEBGL_compressed_texture_pvrtc`, and `WEBGL_compressed_texture_etc1`.
* Added `CompressedTextureBuffer`.
* Improved `RectangleGeometry` by skipping unecessary logic in the code [#4948](https://github.com/AnalyticalGraphicsInc/cesium/pull/4948)
* Fixed an issue where the camera would zoom past an object and flip to the other side of the globe. [#4967](https://github.com/AnalyticalGraphicsInc/cesium/pull/4967) and [#4982](https://github.com/AnalyticalGraphicsInc/cesium/pull/4982)

### 1.30 - 2017-02-01

Expand Down
3 changes: 3 additions & 0 deletions Source/Scene/ScreenSpaceCameraController.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@ define([

var alphaDot = Cartesian3.dot(cameraPositionNormal, positionToTargetNormal);
if (alphaDot >= 0.0) {
// We zoomed past the target, and this zoom is not valid anymore.
// This line causes the next zoom movement to pick a new starting point.
object._zoomMouseStart.x = -1;
return;
}
var alpha = Math.acos(-alphaDot);
Expand Down

0 comments on commit 4bcc68f

Please sign in to comment.