morphComplete misfiring event in version 1.0

/* attempting to morph then edit the camera with version 1.0 */

scene.morphComplete.addEventListener(editCamera);

scene.morphTo2D(0);

scene.completeMorph();

console.log("scene.mode: " + scene.mode);

// outputs value of 2 which equates to Cesium.SceneMode.SCENE2D

function editCamera(){

console.log("scene.mode: " + scene.mode);

// outputs value of 3 which equates to Cesium.SceneMode.SCENE3D

scene.camera.position = new Cesium.Cartesian3(-32835.92, 5926671.87, 1275674);

scene.direction = new Cesium.Cartesian3(0, 0, -1);

scene.up = new Cesium.Cartesian3(0, 1, 0);

}

/* It appears that the morphComplete event is firing before the scene.mode has been updated by the call to morphTo2D.

This does not occur in Sandcastle, only in version 1.0 */

/* the z value of position does not seem to effect the zoom level in 2D.

This happens in Sandcastle as well, but I’m not sure what version they are running */

/* addition detail: this code is being run from the window.onload event listener callback.
The problem does not occur when the code is run outside the onload callback */