Skip to content

resize listener is being called after removing the element map from the DOM #1101

@javisantana

Description

@javisantana

if you remove the map element from the DOM using removeChild or $.remove the resize event continue being called due to resize winding to window:

https://github.com/CloudMade/Leaflet/blob/master/src/map/Map.js#L552

posible solutions:

  • add a method to destroy the map and remove that binding
  • listen for domremoved event and remove the binding (it does not work for IE < 8)
  • check if the map is still added when the event is raised

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions