Skip to content

Commit

Permalink
Fix polygon handler to show correct label text
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtoye committed Jun 12, 2012
1 parent 4e3e8bb commit 6a1b9c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Polygon.Draw.js
Expand Up @@ -21,11 +21,11 @@ L.Polygon.Draw = L.Polyline.Draw.extend({
}
},

_getLabelText: function (markerCount) {
_getLabelText: function () {
var text;
if (markerCount === 0) {
if (this._markers.length === 0) {
text = 'Click to start drawing shape.';
} else if (markerCount < 3) {
} else if (this._markers.length < 3) {
text = 'Click to continue drawing shape.';
} else {
text = 'Click first point to close this shape.';
Expand Down

0 comments on commit 6a1b9c7

Please sign in to comment.