findElementViewsAtPoint/findCellViewsAtPoint doesn't detect element when pointer is over a port #2973
Answered
by
kumilingus
Willia-Yang
asked this question in
Q&A
-
IntroductionHi, Is there a way to detect ports at a given point? Or a recommended method to get the port under the mouse? Thanks! Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS, JointJS+ |
Beta Was this translation helpful? Give feedback.
Answered by
kumilingus
May 27, 2025
Replies: 1 comment
-
You can get the port ID from the mouse const view = paper.findView(evt.target);
if (view) {
const portId = view.findAttribute('port', evt.target);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Willia-Yang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can get the port ID from the mouse
evt.target
: