Skip to content
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
gigmaps:autopan-update
Open

update the infobubble autopan functionality:#14
gigmaps wants to merge 5 commits intogooglearchive:gh-pagesfrom
gigmaps:autopan-update

Conversation

@gigmaps
Copy link
Contributor

@gigmaps gigmaps commented Oct 27, 2015

this updates the autopan functionality to bring it inline with (ahead of ?) the standard google.maps.InfoWindow() autopan:

  • so map is only panned enough for the infobubble window to be visible with an edge margin - as per
  • add an autopanMargin option to set the margin between the map edge and the infobubble window (with default = 10px)
  • better variable naming & comments in panToView() function

remove comment about the use of anchorPoint being a hack - since pixelBounds has been deprecated

- 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please follow the same style that already existed.

This is mainly around position of comments and keeping to 80 character line limits.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to keep to the 80 char line length

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

- 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants