Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-reset the zoom after zooming past a target. #4982

Merged
merged 3 commits into from
Feb 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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