Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #365 - Edit UX for results map
In this branch, @millereric made some UX changes to the results map view in response to Issue #365 ("Google Map rollover is cropped out of view some times."). @millereric used infoBox.js from the Google Maps utility library, because it allows for easy customizability, including position and styling. Presently, the infoBox is displayed to the right of markers to decrease the likelihood of it being cropped out of the window. The infoBox can be styled either within its options object, or by linking to a CSS stylesheet. @anselmbradford moved all styles to CSS. - @millereric set the marker's optimized property to false in order to prevent events from propagating through the infoBox onto the map (e.g. to prevent markers underneath an open infoBox from registering a mouseover event). - @anselmbradford added a z-index for the close box [x] per @millereric original edit, because it was visible but not clickable. - infoBox.js requires the google maps api to be fully loaded before it is loaded. This has presented some difficulties because of the asynchronous loading of the google maps api. @anselmbradford nested the dependencies so they loaded in order, which consequentially required the result-map-manager to become self-executing, for better or worse. @anselmbradford's commit also edits the following: - Removes the clearMarkers method, which is only needed if the map results were updated via ajax (which isn’t currently used). - Removes the metadata and summary text variables, which were no longer used. - Adds additional code comments to the map manager code. - Configures infobox states using a bit mask so that complex interactions can be programmed as toggleable flags that are then evaluated for to determine when to open or close the infobox. - Configures jshint task to allow bitwise operations that are needed for a bitmask. - Adds additional styles to the infobox to make it more consistent with links and other such styling in other parts of the app. - Adds CSS corner arrow to info box so it’s clearer which marker the info box is pointing toward.
- Loading branch information