From 7e88df21c4009e80812d82876ad5cb42626a95e8 Mon Sep 17 00:00:00 2001 From: hpinkos Date: Tue, 23 Jun 2015 14:25:04 -0400 Subject: [PATCH] fix drill pick --- Apps/Sandcastle/gallery/Picking.html | 4 ++++ Source/Scene/Scene.js | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/Apps/Sandcastle/gallery/Picking.html b/Apps/Sandcastle/gallery/Picking.html index 793b4f4af49a..3c636c544b20 100644 --- a/Apps/Sandcastle/gallery/Picking.html +++ b/Apps/Sandcastle/gallery/Picking.html @@ -36,6 +36,7 @@ var handler; Sandcastle.addDefaultToolbarButton('Show Cartographic Position on Mouse Over', function() { + scene.camera.viewRectangle(Cesium.Camera.DEFAULT_VIEW_RECTANGLE, scene.mapProjection.ellipsoid); var ellipsoid = scene.globe.ellipsoid; var entity = viewer.entities.add({ label : { @@ -68,6 +69,7 @@ image : '../images/Cesium_Logo_overlay.png' } }); + viewer.zoomTo(entity); // If the mouse is over the billboard, change its scale and color handler = new Cesium.ScreenSpaceEventHandler(scene.canvas); @@ -126,6 +128,8 @@ } }); makeProperty(green, Cesium.Color.GREEN.withAlpha(0.5)); + + viewer.zoomTo(red); // Move the primitive that the mouse is over to the top. handler = new Cesium.ScreenSpaceEventHandler(scene.canvas); diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index f92ed359b657..865fbc8eefc5 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -1987,6 +1987,16 @@ define([ attributes.show = ShowGeometryInstanceAttribute.toValue(true, attributes.show); } + this._commandList.length = 0; + updatePrimitives(this); + createPotentiallyVisibleSet(this); + + var passState = this._passState; + passState.framebuffer = undefined; + passState.blendingEnabled = undefined; + passState.scissorTest = undefined; + executeCommands(this, passState, defaultValue(this.backgroundColor, Color.BLACK)); + return result; };