Skip to content

Commit

Permalink
Honor the highlight size limit with centroid annotations.
Browse files Browse the repository at this point in the history
This makes the interface more consistent, but still has the surprise
that there is a threshold where the behavior changes.  We may want to
revisit highlighting in large sets of annotations, in which case we need
to adjust centroid annotations, too.
  • Loading branch information
manthey committed May 20, 2022
1 parent 5131e44 commit b42a4a9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ var GeojsImageViewerWidgetExtension = function (viewer) {
if (annotation._centroids) {
annotation._shownIds = new Set(feature.data().map((d) => d.id));
}
if (data.length <= this._highlightFeatureSizeLimit) {
if (data.length <= this._highlightFeatureSizeLimit && !annotation._centroids) {
this._featureOpacity[annotation.id][feature.featureType] = feature.data()
.map(({id, properties}) => {
return {
Expand Down

0 comments on commit b42a4a9

Please sign in to comment.