Skip to content

Commit

Permalink
Update Map.jsx with padding for fitBounds (Terrastories#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudokemper committed Jul 5, 2020
1 parent e6eac0a commit 35ffbf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rails/app/javascript/components/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class Map extends Component {
) {
const { bounds, ...frameOptions } = this.props.framedView;
if (bounds) {
this.map.fitBounds(bounds, { duration: 2000.0, ...frameOptions });
this.map.fitBounds(bounds, { padding: 50, duration: 2000.0, ...frameOptions });
} else {
this.map.easeTo({ duration: 2000.0, ...frameOptions });
}
Expand Down

0 comments on commit 35ffbf9

Please sign in to comment.