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

feat(dia.Paper): add methods to find cell/element/link views in paper #2781

Merged
merged 8 commits into from
Oct 29, 2024

Conversation

kumilingus
Copy link
Contributor

  • feat(dia.Paper): add methods to find cell/element/link views in paper
    • add findCellViewsAtPoint(), findLinkViewsAtPoint(), and findElementViewsAtPoint()`
    • add findCellViewsInArea(), findLinkViewsInArea(), and findElementViewsInArea()`
    • deprecate findViewsFromPoint() and `findViewsInArea()
  • feat(dia.Graph): add methods to find cells/elements/links in graph
    • add findCellsAtPoint(), findLinksAtPoint(), and findElementsAtPoint()
    • add findCellsInArea(), findLinksInArea(), and findElementsInArea()
    • add findCellsUnderElement(), findLinksUnderElement(), findElementsUnderElement()
    • deprecate findModelsFromPoint() and findModelsInArea()
  • feat(dia.CellView): add isIntersecting() method
  • feat(g.Rect): add strict option to containsPoint()

This PR:

  • adds convenience methods for searching for links in the paper based on their geometry.
  • optimizes the performance of search for elements and links in the paper.
  • allows us to further optimize the search by a more efficient data structure in the graph.
  • It lays the foundation for the future implementation of snap-to-link feature (as opposed to existing snap-to-elements).

@Geliogabalus Geliogabalus merged commit ca06b4e into clientIO:master Oct 29, 2024
3 checks passed
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.

2 participants