Created
May 15, 2014 19:14
-
-
Save jamak/9aecd43e209e42999055 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
om/IRenderState | |
(render-state | |
[this {:keys [move toggle | |
google-map directions-renderer | |
center directions poi-visible]}] | |
;; any diffs to the DOM are handled automatically by React, | |
;; but we have to manually diff the parts of the Google Maps state that we are managing: | |
(when (:dirty center) | |
(.panTo google-map (:data center))) | |
(when (:dirty directions) | |
(.setDirections directions-renderer (:data directions))) | |
(when (:dirty poi-visible) | |
(toggle-poi-layer owner)) | |
(update-markers (:points app) owner) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment