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

Fix for #2813 (scene.drillPick breaks scene.pickPosition) #2829

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 4 additions & 0 deletions Apps/Sandcastle/gallery/Picking.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 : {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions Source/Scene/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down