Skip to content

Commit

Permalink
Merge pull request #7744 from emstrabala/fix-cluster-labels
Browse files Browse the repository at this point in the history
Fixed labels don't show for individual entities in datasources when c…
  • Loading branch information
Hannah authored Sep 19, 2019
2 parents 3547a3f + 58aa60b commit 605a079
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Change Log
* Reduces size of approximateTerrainHeights.json by rounding the numbers [#7959](https://github.com/AnalyticalGraphicsInc/cesium/pull/7959)
* Fixed undefined `quadDetails` error from zooming into the map really close. [#8011](https://github.com/AnalyticalGraphicsInc/cesium/pull/8011)
* Fixed triangulation bug in polygons using `ArcType.RHUMB`. [#8042](https://github.com/AnalyticalGraphicsInc/cesium/issues/8042)
* Fixed labels don't show for individual entities in datasources when clustering is enabled [#6087](https://github.com/AnalyticalGraphicsInc/cesium/issues/6087)

### 1.61 - 2019-09-03

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Nathan Schulte](https://github.com/nmschulte)
* [Jed Fong](https://github.com/jedfong)
* [Brandon McAllister](https://github.com/bmcallis)
* [Eric Strabala](https://github.com/emstrabala)
* [Inovaworks](http://www.inovaworks.com/)
* [Sergio Flores](https://github.com/relfos)
* [CubeWerx Inc.](http://www.cubewerx.com/)
Expand Down
8 changes: 4 additions & 4 deletions Source/DataSources/EntityCluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ define([

expandBoundingBox(result, pixelRange);

if (entityCluster._clusterLabels && !defined(item._labelCollection) && defined(item.id) && hasLabelIndex(entityCluster, item.id) && defined(item.id._label)) {
var labelIndex = entityCluster._collectionIndicesByEntity[item.id];
if (entityCluster._clusterLabels && !defined(item._labelCollection) && defined(item.id) && hasLabelIndex(entityCluster, item.id.id) && defined(item.id._label)) {
var labelIndex = entityCluster._collectionIndicesByEntity[item.id.id].labelIndex;
var label = entityCluster._labelCollection.get(labelIndex);
var labelBBox = Label.getScreenSpaceBoundingBox(label, coord, labelBoundingBoxScratch);
expandBoundingBox(labelBBox, pixelRange);
Expand All @@ -130,8 +130,8 @@ define([
function addNonClusteredItem(item, entityCluster) {
item.clusterShow = true;

if (!defined(item._labelCollection) && defined(item.id) && hasLabelIndex(entityCluster, item.id) && defined(item.id._label)) {
var labelIndex = entityCluster._collectionIndicesByEntity[item.id];
if (!defined(item._labelCollection) && defined(item.id) && hasLabelIndex(entityCluster, item.id.id) && defined(item.id._label)) {
var labelIndex = entityCluster._collectionIndicesByEntity[item.id.id].labelIndex;
var label = entityCluster._labelCollection.get(labelIndex);
label.clusterShow = true;
}
Expand Down

0 comments on commit 605a079

Please sign in to comment.