-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(InfoWindowReactChild): allow React elements as content for InfoWindow and InfoBox (which can be styled completely, unlike InfoWindow) #69
Conversation
Nice! Altough I can't say much about the code quality. |
@@ -49,6 +49,10 @@ class ClosureListeners extends React.Component { | |||
this.setState(this.state); | |||
} | |||
|
|||
_handle_infowindow_click () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is something missing in this method? Or could it be removed aswell as the console.log
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@metalmatze this is just a test to see if it's working; all changes in this file can be removed; I know the code is rough, but I wrote this at the end of my work day today and was tired; I was hoping to get advice on improving this code, as it doesn't feel very robust; it does the job though - so I don't need to switch libs in my project; when it's a bit more refined, I'm sure it'll get in the main repo
e0b4ffb
to
f673970
Compare
@tomchentw I updated my PR - it no longer uses hardcoded tests inside |
7730653
to
9241bd0
Compare
I like the new API, which moves |
1bd29ba
to
792f61f
Compare
792f61f
to
5314502
Compare
@tomchentw hey there, can I improve anything else about this PR? I did several more updates to it; thanks for the great project! |
TODO: add this in #88 Hi @thetiby @metalmatze , I took a day to rewrite the module from scratch on #88 . It will be great if you could take a look at it. Thanks! |
@tomchentw implemented the API suggested by you in #25 (comment)
The usage would be:
wrapperClassName
for the child element in order to give that class name to the wrapper div (for CSS styling, etc)Important!
InfoBox
won't allow any React events to bubble unless you give theenableEventPropagation={true}
prop to it; see the whole API here: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.htmlThe prop is disabled by default because it allows interaction with the map "through" the infobox when the above is set. Because React uses event delegation to trigger the handlers, couldn't find a way to cancel this effect. I'm considering using react-native-listener to solve this. Update: it works, though it's a bit hacky; I welcome suggestions
cc @metalmatze