Skip to content

Commit 8ff642f

Browse files
author
Hannah
authored
Merge pull request #6924 from AnalyticalGraphicsInc/polyline-picking
Return the `GroundPolylinePrimitive` when a ground polyline is picked
2 parents f6fa481 + 2ea7099 commit 8ff642f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Change Log
2626
* Fixed night shading in 2D and Columbus view. [#4122](https://github.com/AnalyticalGraphicsInc/cesium/issues/4122)
2727
* Fixed a crash when setting show to `false` on a polyline clamped to the ground. [#6912](https://github.com/AnalyticalGraphicsInc/cesium/issues/6912)
2828
* Fixed crash that happened when calling `scene.pick` after setting a new terrain provider [#6918](https://github.com/AnalyticalGraphicsInc/cesium/pull/6918)
29+
* 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)
2930

3031
### 1.48 - 2018-08-01
3132

Source/Scene/GroundPolylinePrimitive.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,8 @@ define([
639639
groundInstances[i] = new GeometryInstance({
640640
geometry : geometryInstance.geometry,
641641
attributes : attributes,
642-
id : geometryInstance.id
642+
id : geometryInstance.id,
643+
pickPrimitive : that
643644
});
644645
}
645646

Specs/Scene/GroundPolylinePrimitiveSpec.js

+4
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ defineSuite([
688688
verifyGroundPolylinePrimitiveRender(groundPolylinePrimitive, polylineColor);
689689

690690
expect(scene).toPickAndCall(function(result) {
691+
expect(result.primitive).toEqual(groundPolylinePrimitive);
691692
expect(result.id).toEqual('polyline on terrain');
692693
});
693694
});
@@ -707,6 +708,7 @@ defineSuite([
707708
verifyGroundPolylinePrimitiveRender(groundPolylinePrimitive, polylineColor);
708709

709710
expect(scene).toPickAndCall(function(result) {
711+
expect(result.primitive).toEqual(groundPolylinePrimitive);
710712
expect(result.id).toEqual('polyline on terrain');
711713
});
712714
});
@@ -726,6 +728,7 @@ defineSuite([
726728
verifyGroundPolylinePrimitiveRender(groundPolylinePrimitive, polylineColor);
727729

728730
expect(scene).toPickAndCall(function(result) {
731+
expect(result.primitive).toEqual(groundPolylinePrimitive);
729732
expect(result.id).toEqual('polyline on terrain');
730733
});
731734
});
@@ -764,6 +767,7 @@ defineSuite([
764767
verifyGroundPolylinePrimitiveRender(groundPolylinePrimitive, polylineColor);
765768

766769
expect(scene).toPickAndCall(function(result) {
770+
expect(result.primitive).toEqual(groundPolylinePrimitive);
767771
expect(result.id).toEqual('big polyline on terrain');
768772
});
769773
scene.completeMorph();

0 commit comments

Comments
 (0)