This repository was archived by the owner on Dec 15, 2018. It is now read-only.
update the infobubble autopan functionality:#14
Open
gigmaps wants to merge 5 commits intogooglearchive:gh-pagesfrom
Open
update the infobubble autopan functionality:#14gigmaps wants to merge 5 commits intogooglearchive:gh-pagesfrom
gigmaps wants to merge 5 commits intogooglearchive:gh-pagesfrom
Conversation
- so map is only panned enough for the infobubble window to be visible with an edge margin - as per google.maps.InfoWindow() - add an `autopanMargin` option to set the margin between the map edge and the infobubble window (with default = 10px) - update variable naming & comments in panToView() function remove comment about the use of `anchorPoint` being a hack - since `pixelBounds` has been deprecated
- add infobubble `arrowHeight` variable to take into account the (variable) height of the bottom pointer / arrow - update spaceTop formula and associated comments
src/infobubble.js
Outdated
Contributor
There was a problem hiding this comment.
Can you please follow the same style that already existed.
This is mainly around position of comments and keeping to 80 character line limits.
Contributor
Author
There was a problem hiding this comment.
ok no worries - comments shifted to line above and line length limited to ~80 char.
- remove comment about the use of `anchorPoint` being a hack - since `pixelBounds` has been deprecated
src/infobubble.js
Outdated
Contributor
There was a problem hiding this comment.
Try to keep to the 80 char line length
- keep to the 80 char line length
- spaces around '/'
- space between ')' and '{'
- comment indentation 2 spaces instead of 4
- add 'var' to define 'newMapCenterLatLng' as local variable
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this updates the autopan functionality to bring it inline with (ahead of ?) the standard
google.maps.InfoWindow()autopan:infobubblewindow to be visible with an edge margin - as perautopanMarginoption to set the margin between the map edge and the infobubble window (with default = 10px)panToView()functionremove comment about the use of
anchorPointbeing a hack - sincepixelBoundshas been deprecated