Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 by `widget.position({right: 20, top: 10})`, instead of switching the css from using `left` to `right`, combined them, so that functionally, the widget was specifying `{left: 10, right: 20, top: 10}`. Although this could be avoided by explicitly calling `widget.position({left: null, right: 20, top: 10})` and could change just one coordinate via call like `widget.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.
- Loading branch information