From 59a699501858f6127fd3583e9697b417d199dd67 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Tue, 2 Jun 2015 11:06:17 -0400 Subject: [PATCH 1/2] Exception when using the camera inside morphComplete handler Update the scene camera at the end of a morph before raising the morph event, otherwise the camera still thinks we're morphing and throws exceptions. Fixes #2678. --- Source/Scene/SceneTransitioner.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Scene/SceneTransitioner.js b/Source/Scene/SceneTransitioner.js index 3dcb657a7164..bfcd0bba6cbf 100644 --- a/Source/Scene/SceneTransitioner.js +++ b/Source/Scene/SceneTransitioner.js @@ -656,6 +656,7 @@ define([ var wasMorphing = defined(transitioner._completeMorph); transitioner._completeMorph = undefined; + scene.camera.update(scene.mode); transitioner._scene.morphComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.SCENE3D, wasMorphing); } @@ -678,6 +679,7 @@ define([ var wasMorphing = defined(transitioner._completeMorph); transitioner._completeMorph = undefined; + scene.camera.update(scene.mode); transitioner._scene.morphComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.SCENE2D, wasMorphing); } @@ -703,6 +705,7 @@ define([ var wasMorphing = defined(transitioner._completeMorph); transitioner._completeMorph = undefined; + scene.camera.update(scene.mode); transitioner._scene.morphComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.COLUMBUS_VIEW, wasMorphing); } From 7a40d851e5b7c22ac88ea97a337941a6f67e95c8 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Wed, 3 Jun 2015 21:15:44 -0400 Subject: [PATCH 2/2] Update CHANGES --- CHANGES.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d49c045474ee..58d6cd422156 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,8 +3,10 @@ Change Log ### 1.11 - 2015-07-01 -* Improved the algorithm that `Camera.viewRectangle` uses to select the position of the camera, so that the specified rectangle is now better centered on the screen. -* The performance statistics displayed by setting `scene.debugShowFramesPerSecond` to `true` can now be styled using the `cesium-performanceDisplay` CSS classes in `shared.css`. +* Improved the algorithm that `Camera.viewRectangle` uses to select the position of the camera, so that the specified rectangle is now better centered on the screen [#2764](https://github.com/AnalyticalGraphicsInc/cesium/issues/2764). +* The performance statistics displayed by setting `scene.debugShowFramesPerSecond` to `true` can now be styled using the `cesium-performanceDisplay` CSS classes in `shared.css` [#2779](https://github.com/AnalyticalGraphicsInc/cesium/issues/2779). +* Fixed a crash when `viewer.zoomTo` or `viewer.flyTo` were called immediately before or during a scene morph [#2775](https://github.com/AnalyticalGraphicsInc/cesium/issues/2775). +* Fixed an issue where `Camera` functions would throw an exception if used from within a `Scene.morphComplete` callback [#2776](https://github.com/AnalyticalGraphicsInc/cesium/issues/2776). ### 1.10 - 2015-06-01