Skip to content

Conversation

Jungzl
Copy link
Contributor

@Jungzl Jungzl commented Feb 23, 2023

fix #1671

return 0;
}
return features.filter(
(feature, index) => features.findIndex(f => f.layer.id === feature.layer.id) === index
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very inefficient. Use new Set(ids).size

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

const hoveringLayersCount = this._uniqueLayersCount(features);

if (!isHovering && wasHovering) {
if (hoveringLayersCount < hoveredLayersCount) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct, though? What if the layer count is the same but one layer is replaced by another?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't know if it's ok to call pointEvents twice in one callback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onMouseEnter isn't triggered when moving between layers from different sources

2 participants