Skip to content

Commit

Permalink
Merge pull request #15 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
GhitaB authored Feb 20, 2024
2 parents e8fcc03 + a97857e commit 503b565
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [0.3.2](https://github.com/eea/volto-openlayers-map/compare/0.3.1...0.3.2) - 20 February 2024

### [0.3.1](https://github.com/eea/volto-openlayers-map/compare/0.3.0...0.3.1) - 9 February 2024

#### :house: Internal changes
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-openlayers-map",
"version": "0.3.1",
"version": "0.3.2",
"description": "@eeacms/volto-openlayers-map: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand All @@ -24,9 +24,9 @@
"@plone/scripts": "*",
"babel-plugin-transform-class-properties": "^6.24.1",
"cypress-fail-fast": "^5.0.1",
"md5": "^2.3.0",
"husky": "^8.0.3",
"lint-staged": "^14.0.1"
"lint-staged": "^14.0.1",
"md5": "^2.3.0"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
Expand Down
4 changes: 4 additions & 0 deletions src/Map/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class Map extends React.PureComponent {
this.updateView = this.updateView.bind(this);
this.map = null;
this.mapRendered = false;
this.state = { map: null };
}

init() {
Expand Down Expand Up @@ -125,6 +126,9 @@ class Map extends React.PureComponent {
for (let event in events) {
this.map.on(event, events[event]);
}

// this is needed, to cause the MapContext to refresh with a new value and the proper reference to this.map
this.setState({ map: this.map });
}

addControl(control) {
Expand Down

0 comments on commit 503b565

Please sign in to comment.