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

Fixed labels don't show for individual entities in datasources when c… #7744

Merged
merged 2 commits into from
Sep 19, 2019
Merged
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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