You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce
Steps to reproduce the behavior:
Difficult to reproduce, and our code can't be shared online.
Expected behavior
Not setting the opacity when the icon is null.
Current behavior
This occurs when using ember-leaflet-marker-cluster alongside leaflet and the way ember-leaflet-marker-cluster is being used ithe opacity of a null icon tries to be set which results in this exception: Uncaught TypeError: Cannot read property 'style' of null at setOpacity (leaflet-src.js:2368) at NewClass._updateOpacity (leaflet-src.js:7694) at NewClass.setOpacity (leaflet-src.js:7684) at NewClass.clusterShow (leaflet.markercluster.js:2) at leaflet.markercluster.js:2 at NewClass._recursively (leaflet.markercluster.js:2) at NewClass._recursivelyRemoveChildrenFromMap (leaflet.markercluster.js:2) at NewClass._moveEnd (leaflet.markercluster.js:2) at NewClass._mergeSplitClusters (leaflet.markercluster.js:2) at NewClass._zoomEnd (leaflet.markercluster.js:2)
Additional context
Managed to fix this locally by changing the _updateOpacity method in src/layer/marker/Marker.js file and changing it to check if the icon is set before updating the opacity change it from: DomUtil.setOpacity(this._icon, opacity)
to if (this._icon) { DomUtil.setOpacity(this._icon, opacity); }
This seems like a very small change so shouldn't break anything and it would help us out loads.
I'll add in a pull request with the change I mentioned
Minimal example reproducing the issue
As I mentioned it's difficult to reproduce and we can't share our code online. If the code needs to be reproduced call the _removeIcon method, then call the _updateOpacity method.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Steps to reproduce the behavior:
Difficult to reproduce, and our code can't be shared online.
Expected behavior
Not setting the opacity when the icon is null.
Current behavior
This occurs when using ember-leaflet-marker-cluster alongside leaflet and the way ember-leaflet-marker-cluster is being used ithe opacity of a null icon tries to be set which results in this exception:
Uncaught TypeError: Cannot read property 'style' of null at setOpacity (leaflet-src.js:2368) at NewClass._updateOpacity (leaflet-src.js:7694) at NewClass.setOpacity (leaflet-src.js:7684) at NewClass.clusterShow (leaflet.markercluster.js:2) at leaflet.markercluster.js:2 at NewClass._recursively (leaflet.markercluster.js:2) at NewClass._recursivelyRemoveChildrenFromMap (leaflet.markercluster.js:2) at NewClass._moveEnd (leaflet.markercluster.js:2) at NewClass._mergeSplitClusters (leaflet.markercluster.js:2) at NewClass._zoomEnd (leaflet.markercluster.js:2)
Environment
Additional context
Managed to fix this locally by changing the _updateOpacity method in src/layer/marker/Marker.js file and changing it to check if the icon is set before updating the opacity change it from:
DomUtil.setOpacity(this._icon, opacity)
to
if (this._icon) { DomUtil.setOpacity(this._icon, opacity); }
This seems like a very small change so shouldn't break anything and it would help us out loads.
I'll add in a pull request with the change I mentioned
Minimal example reproducing the issue
As I mentioned it's difficult to reproduce and we can't share our code online. If the code needs to be reproduced call the _removeIcon method, then call the _updateOpacity method.
The text was updated successfully, but these errors were encountered: