valhalla / demos

demos
MIT License
98 stars 57 forks source link

Fix click #125

Closed ptpt closed 8 years ago

ptpt commented 8 years ago

This patch fixes the problem that multiple handlers were added to route button's click listeners since you put the logic of addEventListener in the map.click handler (so every time you click the map it will aggregate such a handler), when you click the route button (e.g. drive), all of these handlers will be executed.

And also some minor fixes.

kevinkreiser commented 8 years ago

wow @ptpt thanks for this, we've been looking for this bug for a while but havent had a chance to find it! i'll let to @kdiluca to look it over/merge.

kdiluca commented 8 years ago

Thanks so much @ptpt . I just figured out how to fix this on Thursday but didn't have the chance to merge it in. Thanks for your help!