Skip to content

Commit 4bcc68f

Browse files
authored
Merge pull request #4982 from AnalyticalGraphicsInc/zoom-auto-reset
Auto-reset the zoom after zooming past a target.
2 parents 65a94d5 + 08adff8 commit 4bcc68f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGES.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ Change Log
22
==========
33

44
### 1.31 - 2017-03-01
5+
56
* Deprecated
6-
* `ArcGisImageServerTerrainProvider` will be removed in 1.32 due to missing TIFF support in web browsers.
7+
* `ArcGisImageServerTerrainProvider` will be removed in 1.32 due to missing TIFF support in web browsers.
78
* Breaking changes
8-
* Corrected spelling of `Color.FUCHSIA` from `Color.FUSCHIA`
9+
* Corrected spelling of `Color.FUCHSIA` from `Color.FUSCHIA`. [#4977](https://github.com/AnalyticalGraphicsInc/cesium/pull/4977)
910
* 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.
1011
* Enable rendering `GroundPrimitives` on hardware without the `EXT_frag_depth` extension; however, this could cause artifacts for certain viewing angles.
1112
* Added compressed texture support. [#4758](https://github.com/AnalyticalGraphicsInc/cesium/pull/4758)
@@ -14,6 +15,7 @@ Change Log
1415
* Added new `PixelFormat` and `WebGLConstants` enums from WebGL extensions `WEBGL_compressed_s3tc`, `WEBGL_compressed_texture_pvrtc`, and `WEBGL_compressed_texture_etc1`.
1516
* Added `CompressedTextureBuffer`.
1617
* Improved `RectangleGeometry` by skipping unecessary logic in the code [#4948](https://github.com/AnalyticalGraphicsInc/cesium/pull/4948)
18+
* 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)
1719

1820
### 1.30 - 2017-02-01
1921

Source/Scene/ScreenSpaceCameraController.js

+3
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,9 @@ define([
576576

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

0 commit comments

Comments
 (0)