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

Propagating events through tree #67

Closed
fabslab opened this issue Sep 30, 2015 · 2 comments
Closed

Propagating events through tree #67

fabslab opened this issue Sep 30, 2015 · 2 comments

Comments

@fabslab
Copy link

fabslab commented Sep 30, 2015

Another question to do with a similar project to this. I would like to hook into React's event system to dispatch events (to begin with keydown) through the tree, bubbling from my target which in this case is not a DOM node but a custom React component that is backed by a scene graph node in a WebGL library, constructed similarly to the ReactART components. Because of this the target of the native browser event is of course not the actual target React component I would like to propogate from.
To dispatch I see I can do something like this:
ReactEventListener.dispatchEvent(EventConstants.topLevelTypes.topKeyDown, browserEvent);
But that leads to the ReactMount module attempting to iterate through the ancestors using a mapping to DOM nodes. Is there a suggested way to change this behavior so it can receive my desired target ReactComponent and walk up the tree from that instead, to execute the event handling?

@fabslab fabslab changed the title Propogating events through tree Propagating events through tree Sep 30, 2015
@sophiebits
Copy link
Member

This isn't supported, sorry.

@fabslab
Copy link
Author

fabslab commented Sep 30, 2015

Okay thanks, just wanted to see if there was anything I should look at before I figure a way out on my own.

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

2 participants