Skip to content

Commit 4a4adf0

Browse files
authored
fix(widget-map): update ol to latest version
1 parent 9f0d119 commit 4a4adf0

File tree

3 files changed

+306
-115
lines changed

3 files changed

+306
-115
lines changed

packages/netlify-cms-widget-map/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"react-immutable-proptypes": "^2.1.0"
3131
},
3232
"dependencies": {
33-
"ol": "^5.3.1"
33+
"ol": "^6.9.0"
3434
}
3535
}

packages/netlify-cms-widget-map/src/withMapControl.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ export default function withMapControl({ getFormat, getMap } = {}) {
3333
static propTypes = {
3434
onChange: PropTypes.func.isRequired,
3535
field: PropTypes.object.isRequired,
36+
height: PropTypes.string,
3637
value: PropTypes.node,
3738
};
3839

3940
static defaultProps = {
4041
value: '',
42+
height: '400px',
4143
};
4244

4345
constructor(props) {
@@ -70,6 +72,8 @@ export default function withMapControl({ getFormat, getMap } = {}) {
7072
}
7173

7274
render() {
75+
const { height } = this.props;
76+
7377
return (
7478
<ClassNames>
7579
{({ cx, css }) => (
@@ -80,6 +84,7 @@ export default function withMapControl({ getFormat, getMap } = {}) {
8084
${olStyles};
8185
padding: 0;
8286
overflow: hidden;
87+
height: ${height};
8388
`,
8489
)}
8590
ref={this.mapContainer}

0 commit comments

Comments
 (0)