Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Network: detect click on edge's label? #824

Closed
rwu823 opened this issue May 11, 2015 · 7 comments
Closed

Network: detect click on edge's label? #824

rwu823 opened this issue May 11, 2015 · 7 comments

Comments

@rwu823
Copy link

rwu823 commented May 11, 2015

Currently I can detect click on whole edge if prop.edges.length === 1 && !prop.nodes.length, but is it possible detect clicked on edge's label?

@AlexDM0
Copy link
Contributor

AlexDM0 commented May 11, 2015

Hi,

No, we do not take the label into account when checking for clicks.
We could put this up as a feature request?

Regards

@AlexDM0
Copy link
Contributor

AlexDM0 commented May 11, 2015

Hi,

I've added this to the feature requests:
http://visjs.org/featureRequests.html

We cannot say when this feature will be implemented at this time. We try to collect all feature requests on our website and close the issues. This does not mean we will ignore this request. More information on this policy can be found here:

http://visjs.org/blog.html#New\ website\ for\ vis.js!

Regards,

Alex

@AlexDM0 AlexDM0 closed this as completed May 11, 2015
@mojoaxel
Copy link
Member

Reopening as Feature-Request issue (see #2114).
Everybody: Please feel free to implement this!

@wimrijnders
Copy link
Contributor

Keeping this open, there appears to be more interest for this (e.g. #3261).

@karenhanson
Copy link

Could this be broadened to include a click event on node labels as well (where node labels are outside of the nodes), or should I log a separate feature request? I would like to be able to make the behavior of a node click also happen when someone clicks the node label under it. Thanks!

@wimrijnders
Copy link
Contributor

@karenhansen I'm looking at it right now and yes, I'll take any label into account, irrespective of their positioning to the parent node/edge. This falls under the current issue, so don't bother with a new one.

I'm actually taking it a bit further than that, because in the future, due to known pending requests, I expect there to be:

  • Multiple labels per node/edge
  • z-ordering for nodes/edges
  • option for returning all clicked on items instead of just the topmost.

It's not that these will be implemented right away, but I'd like the label click event to be ready for them.

@wimrijnders
Copy link
Contributor

Got it working. Need to do documentation as well before submitting. And clean up of course.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants