Skip to content

Commit

Permalink
Merge pull request #6924 from AnalyticalGraphicsInc/polyline-picking
Browse files Browse the repository at this point in the history
Return the `GroundPolylinePrimitive` when a ground polyline is picked
  • Loading branch information
Hannah authored Aug 16, 2018
2 parents f6fa481 + 2ea7099 commit 8ff642f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Change Log
* Fixed night shading in 2D and Columbus view. [#4122](https://github.com/AnalyticalGraphicsInc/cesium/issues/4122)
* Fixed a crash when setting show to `false` on a polyline clamped to the ground. [#6912](https://github.com/AnalyticalGraphicsInc/cesium/issues/6912)
* Fixed crash that happened when calling `scene.pick` after setting a new terrain provider [#6918](https://github.com/AnalyticalGraphicsInc/cesium/pull/6918)
* Fixed an issue that caused the browser to hang when using `drillPick` on a polyline clamped to the ground. [6907](https://github.com/AnalyticalGraphicsInc/cesium/issues/6907)

### 1.48 - 2018-08-01

Expand Down
3 changes: 2 additions & 1 deletion Source/Scene/GroundPolylinePrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,8 @@ define([
groundInstances[i] = new GeometryInstance({
geometry : geometryInstance.geometry,
attributes : attributes,
id : geometryInstance.id
id : geometryInstance.id,
pickPrimitive : that
});
}

Expand Down
4 changes: 4 additions & 0 deletions Specs/Scene/GroundPolylinePrimitiveSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ defineSuite([
verifyGroundPolylinePrimitiveRender(groundPolylinePrimitive, polylineColor);

expect(scene).toPickAndCall(function(result) {
expect(result.primitive).toEqual(groundPolylinePrimitive);
expect(result.id).toEqual('polyline on terrain');
});
});
Expand All @@ -707,6 +708,7 @@ defineSuite([
verifyGroundPolylinePrimitiveRender(groundPolylinePrimitive, polylineColor);

expect(scene).toPickAndCall(function(result) {
expect(result.primitive).toEqual(groundPolylinePrimitive);
expect(result.id).toEqual('polyline on terrain');
});
});
Expand All @@ -726,6 +728,7 @@ defineSuite([
verifyGroundPolylinePrimitiveRender(groundPolylinePrimitive, polylineColor);

expect(scene).toPickAndCall(function(result) {
expect(result.primitive).toEqual(groundPolylinePrimitive);
expect(result.id).toEqual('polyline on terrain');
});
});
Expand Down Expand Up @@ -764,6 +767,7 @@ defineSuite([
verifyGroundPolylinePrimitiveRender(groundPolylinePrimitive, polylineColor);

expect(scene).toPickAndCall(function(result) {
expect(result.primitive).toEqual(groundPolylinePrimitive);
expect(result.id).toEqual('big polyline on terrain');
});
scene.completeMorph();
Expand Down

0 comments on commit 8ff642f

Please sign in to comment.