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.
The widget position can be any css-style position, or an x, y coordinate for the map. If you change the position using the same attributes as were used previously, it behaved as expected. However, if different attributes were specified, surprising results could occur.
For instance
widget.position({left: 10, top: 10})
followed bywidget.position({right: 20, top: 10})
, instead of switching the css from usingleft
toright
, combined them, so that functionally, the widget was specifying{left: 10, right: 20, top: 10}
. Although this could be avoided by explicitly callingwidget.position({left: null, right: 20, top: 10})
and could change just one coordinate via call likewidget.position({top: 11})
, this is surprising behavior.With this change, setting a widget's position clears the old position attributes if they are not explicitly set.