Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feat]: Make getNeighborIds in ClickSelect public #6871

@Bergiu

Description

@Bergiu

Describe the feature / 功能描述

I was trying to implement a custom hover+click selection that would highlight a path in a graph instead of neighborhood. Adding that behavior to HoverActive was easy, because I was allowed to overwrite the getActiveIds method. But for ClickSelect it was more difficult, because the getNeighbotIds method is private (so I needed to monkey patch it).

I think it would be better to make the getNeighborIds method public, such that developers can easily extend the class to match their own behavior. Also it might be worth of renaming that function to getActiveIds like in the HoverActive class. Both changes together would make the apis to those classes more similar.

Image
The image shows the differences in the extension of those classes and the mentioned monkey patch. It's not a big deal for me as a developer, but unpleasant.

Are you willing to contribute? / 是否愿意参与贡献?

✅ Yes / 是

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for maintainerTriage or intervention needed from a maintainer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions