Skip to content

Commit

Permalink
Merge 2a561ae into 6678026
Browse files Browse the repository at this point in the history
  • Loading branch information
Xintong Xia authored Jun 11, 2019
2 parents 6678026 + 2a561ae commit e933f28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/interactive-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export default class InteractiveMap extends PureComponent<InteractiveMapProps, S
render() {
const {width, height, style, getCursor} = this.props;

const eventCanvasStyle = Object.assign({position: 'relative'}, style, {
const eventCanvasStyle = Object.assign({position: 'relative', overflow: 'hidden'}, style, {
width,
height,
cursor: getCursor(this.state)
Expand Down
9 changes: 7 additions & 2 deletions src/components/static-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ const CONTAINER_STYLE = {
overflow: 'hidden'
};

const OVERLAY_CONTAINER_STYLE = {
...CONTAINER_STYLE,
overflow: 'visible'
};

const propTypes = Object.assign({}, Mapbox.propTypes, {
/** The dimensions of the map **/
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
Expand Down Expand Up @@ -275,7 +280,7 @@ export default class StaticMap extends PureComponent<StaticMapProps, State> {
createElement('div', {
key: 'map-overlays',
className: 'overlays',
style: CONTAINER_STYLE,
style: OVERLAY_CONTAINER_STYLE,
children: this.props.children
})
);
Expand All @@ -284,7 +289,7 @@ export default class StaticMap extends PureComponent<StaticMapProps, State> {

render() {
const {className, width, height, style, visibilityConstraints} = this.props;
const mapContainerStyle = Object.assign({position: 'relative'}, style, {
const mapContainerStyle = Object.assign({position: 'relative', overflow: 'inherit'}, style, {
width,
height
});
Expand Down

0 comments on commit e933f28

Please sign in to comment.