Skip to content

Commit

Permalink
Fixed formatting issues to conform to project style
Browse files Browse the repository at this point in the history
  • Loading branch information
chugcup committed Sep 12, 2016
1 parent f1d7878 commit 9c57165
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/draw/handler/Draw.Polyline.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ L.Draw.Polyline = L.Draw.Feature.extend({
var lastMarker = this._markers.pop(),
poly = this._poly,
// Replaces .spliceLatLngs()
latlngs = poly.getLatLngs();
latlng = latlngs.splice(-1, 1)[0]
this._poly.setLatLngs(latlngs);
latlngs = poly.getLatLngs(),
latlng = latlngs.splice(-1, 1)[0];
this._poly.setLatLngs(latlngs);

this._markerGroup.removeLayer(lastMarker);

Expand Down Expand Up @@ -197,7 +197,7 @@ L.Draw.Polyline = L.Draw.Feature.extend({

_finishShape: function () {
var latlngs = this._poly._defaultShape ? this._poly._defaultShape() : this._poly.getLatLngs();
var intersects = this._poly.newLatLngIntersects(latlngs[latlngs.length-1]);
var intersects = this._poly.newLatLngIntersects(latlngs[latlngs.length - 1]);

if ((!this.options.allowIntersection && intersects) || !this._shapeIsValid()) {
this._showErrorTooltip();
Expand Down
4 changes: 2 additions & 2 deletions src/edit/handler/Edit.Poly.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ L.Edit.Poly = L.Handler.extend({

// Compatibility method to normalize Poly* objects
// between 0.7.x and 1.0+
_defaultShape: function() {
_defaultShape: function () {
if (!L.Polyline._flat) { return this._poly._latlngs; }
return L.Polyline._flat(this._poly._latlngs) ? this._poly._latlngs : this._poly._latlngs[0];
},
Expand Down Expand Up @@ -103,7 +103,7 @@ L.Edit.PolyVerticesEdit = L.Handler.extend({

// Compatibility method to normalize Poly* objects
// between 0.7.x and 1.0+
_defaultShape: function() {
_defaultShape: function () {
if (!L.Polyline._flat) { return this._latlngs; }
return L.Polyline._flat(this._latlngs) ? this._latlngs : this._latlngs[0];
},
Expand Down

0 comments on commit 9c57165

Please sign in to comment.