Closed jaronimoe closed 5 years ago
Hi @jaronimoe, the src code that relates to the (center) hover interactions is here: https://github.com/vasturiano/aframe-forcegraph-component/blob/master/index.js#L241
It uses a raycaster to detect intersections of the center of the canvas with the various objects.
ah the string is queried whether it contains "node" or "link" besides "centerhover".. I was searching for the entire string... - thanks!
already implemented a mouse click handler for graph nodes/edges 👍
Hi, I'm trying to add a click event to the nodes and wanted to see how you defined the on hover event in order to use it as a template - however, I could not figure out where your "on-node-center-hover" is actually defined.. I found the "onNodeCenterHover" definition in the forcegraph schema - but "on-node-center-hover" and "onNodeCenterHover" are nowhere linked in the code.. (searched the entire library for them but got only one hit for each with no connection between them..) where do you define that a mouseover on a node triggers the user defined method specified in the "on-node-center-hover" tag?
it seems like this is a fundamental thing but unfortunately I dont undestand it. could you point me in the right direction? cheers!