Skip to content

Commit

Permalink
fix(widget-map): update ol to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
dagda1 authored Dec 7, 2021
1 parent 9f0d119 commit 4a4adf0
Show file tree
Hide file tree
Showing 3 changed files with 306 additions and 115 deletions.
2 changes: 1 addition & 1 deletion packages/netlify-cms-widget-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"react-immutable-proptypes": "^2.1.0"
},
"dependencies": {
"ol": "^5.3.1"
"ol": "^6.9.0"
}
}
5 changes: 5 additions & 0 deletions packages/netlify-cms-widget-map/src/withMapControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ export default function withMapControl({ getFormat, getMap } = {}) {
static propTypes = {
onChange: PropTypes.func.isRequired,
field: PropTypes.object.isRequired,
height: PropTypes.string,
value: PropTypes.node,
};

static defaultProps = {
value: '',
height: '400px',
};

constructor(props) {
Expand Down Expand Up @@ -70,6 +72,8 @@ export default function withMapControl({ getFormat, getMap } = {}) {
}

render() {
const { height } = this.props;

return (
<ClassNames>
{({ cx, css }) => (
Expand All @@ -80,6 +84,7 @@ export default function withMapControl({ getFormat, getMap } = {}) {
${olStyles};
padding: 0;
overflow: hidden;
height: ${height};
`,
)}
ref={this.mapContainer}
Expand Down
Loading

0 comments on commit 4a4adf0

Please sign in to comment.