Skip to content

Polygon - Click on first point don't finish the shape #510

Closed
@csailly

Description

When drawing a polygon, a click on first point don't finish the polygon.

Analyse :
When drawing, mouseup event is call twice so two markers with same coordinates are created. So first marker is behind second marker and can not be clicked.

Workaround (tested with Leaflet version 0.7.7):
Edit src and comment line setting mouseup event on map :
this._map
//.on('mouseup', this._onMouseUp, this) // Necessary for 0.7 compatibility
.on('mousemove', this._onMouseMove, this)
.on('zoomlevelschange', this._onZoomEnd, this)
.on('click', this._onTouch, this)
.on('zoomend', this._onZoomEnd, this);

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions