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

[Network]events: hoverNode, blurNode, hoverEdge and blurEdge properties same as click #1222

Closed
rwu823 opened this issue Aug 25, 2015 · 5 comments

Comments

@rwu823
Copy link

rwu823 commented Aug 25, 2015

Currently we can only get {node: nodeId} and {edge: edgeId} from event, but this is not enough, why not to same as click ?

@AlexDM0
Copy link
Contributor

AlexDM0 commented Aug 25, 2015

Hi,

I suppose we could unify that. Why is it not enough though? Do you have a usecase for this?

Regards

@rwu823
Copy link
Author

rwu823 commented Aug 25, 2015

e.g. by hoverEdge: I need to know what mouse point coordinate and do something.

@AlexDM0 AlexDM0 added the MAJOR MAJOR change in semantic versioning label Jan 4, 2016
@rjbriody
Copy link

rjbriody commented Apr 15, 2016

I also have a situation where I need to make a decision based on the mouse position for hoverEdge.

It seems like it would be possible to do this without making a breaking change by simply adding the following fields to the existing event (in addition to edge).

event: [Object] original hover event,
pointer: {
    DOM: {x:pointer_x, y:pointer_y},
    canvas: {x:canvas_x, y:canvas_y}
}

The same should likely also be done for hoverNode.

@Tooa Tooa added this to the Major Release v5 milestone Jan 7, 2017
@rjbriody
Copy link

rjbriody commented Jun 2, 2017

This issue should remain open.
Motivation: it was never completed.

@wimrijnders
Copy link
Contributor

OK noted.

wimrijnders added a commit to wimrijnders/vis that referenced this issue Jun 3, 2017
Fix for almende#1222.

This makes the passed data of events `hoverNode`, `hoverEdge`, `blurNode` and `blurEdge`
more conformant to the passed data of the click events. In particular, the following
fields are added to the event data:

```
event: [Object] original hover event,
pointer: {
    DOM: {x:pointer_x, y:pointer_y},
    canvas: {x:canvas_x, y:canvas_y}
}
```

The changes can be tested with example `network/events/InteractionEvents`.
yotamberk pushed a commit that referenced this issue Jul 20, 2017
Fix for #1222.

This makes the passed data of events `hoverNode`, `hoverEdge`, `blurNode` and `blurEdge`
more conformant to the passed data of the click events. In particular, the following
fields are added to the event data:

```
event: [Object] original hover event,
pointer: {
    DOM: {x:pointer_x, y:pointer_y},
    canvas: {x:canvas_x, y:canvas_y}
}
```

The changes can be tested with example `network/events/InteractionEvents`.
primozs pushed a commit to primozs/vis that referenced this issue Jan 3, 2019
Fix for almende#1222.

This makes the passed data of events `hoverNode`, `hoverEdge`, `blurNode` and `blurEdge`
more conformant to the passed data of the click events. In particular, the following
fields are added to the event data:

```
event: [Object] original hover event,
pointer: {
    DOM: {x:pointer_x, y:pointer_y},
    canvas: {x:canvas_x, y:canvas_y}
}
```

The changes can be tested with example `network/events/InteractionEvents`.
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