[Libreoffice-commits] online.git: loleaflet/plugins

Henry Castro hcastro at collabora.com
Thu May 24 16:04:56 UTC 2018


 loleaflet/plugins/draw-0.2.4/.eslintrc                            |   29 --------
 loleaflet/plugins/draw-0.2.4/src/Control.Draw.js                  |    6 -
 loleaflet/plugins/draw-0.2.4/src/Toolbar.js                       |   18 ++---
 loleaflet/plugins/draw-0.2.4/src/Tooltip.js                       |    2 
 loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Circle.js      |    6 -
 loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Polyline.js    |   28 +++----
 loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Rectangle.js   |    4 -
 loleaflet/plugins/draw-0.2.4/src/edit/EditToolbar.js              |    4 -
 loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Circle.js      |    6 -
 loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Marker.js      |    2 
 loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Poly.js        |    4 -
 loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Rectangle.js   |   36 +++++-----
 loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js |    2 
 loleaflet/plugins/draw-0.2.4/src/edit/handler/EditToolbar.Edit.js |    2 
 loleaflet/plugins/draw-0.2.4/src/ext/GeometryUtil.js              |    6 -
 loleaflet/plugins/draw-0.2.4/src/ext/Polygon.Intersect.js         |    4 -
 loleaflet/plugins/draw-0.2.4/src/ext/Polyline.Intersect.js        |   16 ++--
 17 files changed, 73 insertions(+), 102 deletions(-)

New commits:
commit 77f7776fd18bda3a7672f8316ff2ee9a131278dd
Author: Henry Castro <hcastro at collabora.com>
Date:   Thu May 24 12:02:35 2018 -0400

    loleaflet: fixed js lint errors in draw plugin
    
    Change-Id: I06a3d273b4e5d8b3082542037bcf296d75143b71

diff --git a/loleaflet/plugins/draw-0.2.4/.eslintrc b/loleaflet/plugins/draw-0.2.4/.eslintrc
deleted file mode 100644
index c6678be8b..000000000
--- a/loleaflet/plugins/draw-0.2.4/.eslintrc
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "rules": {
-    "camelcase": 2,
-    "quotes": [2, "single"],
-    "no-mixed-spaces-and-tabs": [2, "smart-tabs"],
-    "space-after-function-name": 2,
-    "space-in-parens": 2,
-    "space-in-brackets": 2,
-    "space-before-blocks": 2,
-    "space-after-keywords": 2,
-    "no-lonely-if": 2,
-    "comma-style": 2,
-    "indent": [2, "tab"],
-    "no-underscore-dangle": 0,
-    "no-constant-condition": 0,
-    "no-multi-spaces": 0,
-    "strict": 0,
-    "key-spacing": 0,
-    "no-shadow": 0
-  },
-  "globals": {
-    "L": true,
-    "module": false,
-    "define": false
-  },
-  "env": {
-    "browser": true
-  }
-}
diff --git a/loleaflet/plugins/draw-0.2.4/src/Control.Draw.js b/loleaflet/plugins/draw-0.2.4/src/Control.Draw.js
index 909d0aa8a..6e6c4e10b 100644
--- a/loleaflet/plugins/draw-0.2.4/src/Control.Draw.js
+++ b/loleaflet/plugins/draw-0.2.4/src/Control.Draw.js
@@ -39,9 +39,9 @@ L.Control.Draw = L.Control.extend({
 
 	onAdd: function (map) {
 		var container = L.DomUtil.create('div', 'leaflet-draw'),
-			addedTopClass = false,
-			topClassName = 'leaflet-draw-toolbar-top',
-			toolbarContainer;
+		addedTopClass = false,
+		topClassName = 'leaflet-draw-toolbar-top',
+		toolbarContainer;
 
 		for (var toolbarId in this._toolbars) {
 			if (this._toolbars.hasOwnProperty(toolbarId)) {
diff --git a/loleaflet/plugins/draw-0.2.4/src/Toolbar.js b/loleaflet/plugins/draw-0.2.4/src/Toolbar.js
index 671e13ad3..ae1e9a6a4 100644
--- a/loleaflet/plugins/draw-0.2.4/src/Toolbar.js
+++ b/loleaflet/plugins/draw-0.2.4/src/Toolbar.js
@@ -21,10 +21,10 @@ L.Toolbar = L.Class.extend({
 
 	addToolbar: function (map) {
 		var container = L.DomUtil.create('div', 'leaflet-draw-section'),
-			buttonIndex = 0,
-			buttonClassPrefix = this._toolbarClass || '',
-			modeHandlers = this.getModeHandlers(map),
-			i;
+		buttonIndex = 0,
+		buttonClassPrefix = this._toolbarClass || '',
+		modeHandlers = this.getModeHandlers(map),
+		i;
 
 		this._toolbarContainer = L.DomUtil.create('div', 'leaflet-draw-toolbar leaflet-bar');
 		this._map = map;
@@ -172,9 +172,9 @@ L.Toolbar = L.Class.extend({
 
 	_createActions: function (handler) {
 		var container = this._actionsContainer,
-			buttons = this.getActions(handler),
-			l = buttons.length,
-			li, di, dl, button;
+		buttons = this.getActions(handler),
+		l = buttons.length,
+		li, di, dl, button;
 
 		// Dispose the actions toolbar (todo: dispose only not used buttons)
 		for (di = 0, dl = this._actionButtons.length; di < dl; di++) {
@@ -211,8 +211,8 @@ L.Toolbar = L.Class.extend({
 
 	_showActionsToolbar: function () {
 		var buttonIndex = this._activeMode.buttonIndex,
-			lastButtonIndex = this._lastButtonIndex,
-			toolbarPosition = this._activeMode.button.offsetTop - 1;
+		lastButtonIndex = this._lastButtonIndex,
+		toolbarPosition = this._activeMode.button.offsetTop - 1;
 
 		// Recreate action buttons on every click
 		this._createActions(this._activeMode.handler);
diff --git a/loleaflet/plugins/draw-0.2.4/src/Tooltip.js b/loleaflet/plugins/draw-0.2.4/src/Tooltip.js
index 07146c97f..c67472491 100644
--- a/loleaflet/plugins/draw-0.2.4/src/Tooltip.js
+++ b/loleaflet/plugins/draw-0.2.4/src/Tooltip.js
@@ -37,7 +37,7 @@ L.Tooltip = L.Class.extend({
 
 	updatePosition: function (latlng) {
 		var pos = this._map.latLngToLayerPoint(latlng),
-			tooltipContainer = this._container;
+		tooltipContainer = this._container;
 
 		if (this._container) {
 			tooltipContainer.style.visibility = 'inherit';
diff --git a/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Circle.js b/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Circle.js
index 5b3ca29fc..f30d5ba6b 100644
--- a/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Circle.js
+++ b/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Circle.js
@@ -43,9 +43,9 @@ L.Draw.Circle = L.Draw.SimpleShape.extend({
 
 	_onMouseMove: function (e) {
 		var latlng = e.latlng,
-			showRadius = this.options.showRadius,
-			useMetric = this.options.metric,
-			radius;
+		showRadius = this.options.showRadius,
+		useMetric = this.options.metric,
+		radius;
 
 		this._tooltip.updatePosition(latlng);
 		if (this._isDrawing) {
diff --git a/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Polyline.js b/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Polyline.js
index 075a52494..1c93d3a64 100644
--- a/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Polyline.js
+++ b/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Polyline.js
@@ -121,8 +121,8 @@ L.Draw.Polyline = L.Draw.Feature.extend({
 		}
 
 		var lastMarker = this._markers.pop(),
-			poly = this._poly,
-			latlng = this._poly.spliceLatLngs(poly.getLatLngs().length - 1, 1)[0];
+		poly = this._poly,
+		latlng = this._poly.spliceLatLngs(poly.getLatLngs().length - 1, 1)[0];
 
 		this._markerGroup.removeLayer(lastMarker);
 
@@ -182,7 +182,7 @@ L.Draw.Polyline = L.Draw.Feature.extend({
 
 	_onMouseMove: function (e) {
 		var newPos = e.layerPoint,
-			latlng = e.latlng;
+		latlng = e.latlng;
 
 		// Save latlng
 		// should this be moved to _updateGuide() ?
@@ -280,13 +280,13 @@ L.Draw.Polyline = L.Draw.Feature.extend({
 
 	_drawGuide: function (pointA, pointB) {
 		var length = Math.floor(Math.sqrt(Math.pow((pointB.x - pointA.x), 2) + Math.pow((pointB.y - pointA.y), 2))),
-			guidelineDistance = this.options.guidelineDistance,
-			maxGuideLineLength = this.options.maxGuideLineLength,
-			// Only draw a guideline with a max length
-			i = length > maxGuideLineLength ? length - maxGuideLineLength : guidelineDistance,
-			fraction,
-			dashPoint,
-			dash;
+		guidelineDistance = this.options.guidelineDistance,
+		maxGuideLineLength = this.options.maxGuideLineLength,
+		// Only draw a guideline with a max length
+		i = length > maxGuideLineLength ? length - maxGuideLineLength : guidelineDistance,
+		fraction,
+		dashPoint,
+		dash;
 
 		//create the guides container if we haven't yet
 		if (!this._guidesContainer) {
@@ -332,7 +332,7 @@ L.Draw.Polyline = L.Draw.Feature.extend({
 
 	_getTooltipText: function () {
 		var showLength = this.options.showLength,
-			labelText, distanceStr;
+		labelText, distanceStr;
 
 		if (this._markers.length === 0) {
 			labelText = {
@@ -358,7 +358,7 @@ L.Draw.Polyline = L.Draw.Feature.extend({
 
 	_updateRunningMeasure: function (latlng, added) {
 		var markersLength = this._markers.length,
-			previousMarkerIndex, distance;
+		previousMarkerIndex, distance;
 
 		if (this._markers.length === 1) {
 			this._measurementRunningTotal = 0;
@@ -372,8 +372,8 @@ L.Draw.Polyline = L.Draw.Feature.extend({
 
 	_getMeasurementString: function () {
 		var currentLatLng = this._currentLatLng,
-			previousLatLng = this._markers[this._markers.length - 1].getLatLng(),
-			distance;
+		previousLatLng = this._markers[this._markers.length - 1].getLatLng(),
+		distance;
 
 		// calculate the distance from the last fixed point to the mouse position
 		distance = this._measurementRunningTotal + currentLatLng.distanceTo(previousLatLng);
diff --git a/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Rectangle.js b/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Rectangle.js
index d83120f27..7acd277a0 100644
--- a/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Rectangle.js
+++ b/loleaflet/plugins/draw-0.2.4/src/draw/handler/Draw.Rectangle.js
@@ -42,8 +42,8 @@ L.Draw.Rectangle = L.Draw.SimpleShape.extend({
 
 	_getTooltipText: function () {
 		var tooltipText = L.Draw.SimpleShape.prototype._getTooltipText.call(this),
-			shape = this._shape,
-			latLngs, area, subtext;
+		shape = this._shape,
+		latLngs, area, subtext;
 
 		if (shape) {
 			latLngs = this._shape.getLatLngs();
diff --git a/loleaflet/plugins/draw-0.2.4/src/edit/EditToolbar.js b/loleaflet/plugins/draw-0.2.4/src/edit/EditToolbar.js
index b2b4a95ef..b423cf35f 100644
--- a/loleaflet/plugins/draw-0.2.4/src/edit/EditToolbar.js
+++ b/loleaflet/plugins/draw-0.2.4/src/edit/EditToolbar.js
@@ -125,8 +125,8 @@ L.EditToolbar = L.Toolbar.extend({
 
 	_checkDisabled: function () {
 		var featureGroup = this.options.featureGroup,
-			hasLayers = featureGroup.getLayers().length !== 0,
-			button;
+		hasLayers = featureGroup.getLayers().length !== 0,
+		button;
 
 		if (this.options.edit) {
 			button = this._modes[L.EditToolbar.Edit.TYPE].button;
diff --git a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Circle.js b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Circle.js
index ce679677a..288eb7229 100644
--- a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Circle.js
+++ b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Circle.js
@@ -9,7 +9,7 @@ L.Edit.Circle = L.Edit.SimpleShape.extend({
 
 	_createResizeMarker: function () {
 		var center = this._shape.getLatLng(),
-			resizemarkerPoint = this._getResizeMarkerPoint(center);
+		resizemarkerPoint = this._getResizeMarkerPoint(center);
 
 		this._resizeMarkers = [];
 		this._resizeMarkers.push(this._createMarker(resizemarkerPoint, this.options.resizeIcon));
@@ -18,7 +18,7 @@ L.Edit.Circle = L.Edit.SimpleShape.extend({
 	_getResizeMarkerPoint: function (latlng) {
 		// From L.shape.getBounds()
 		var delta = this._shape._radius * Math.cos(Math.PI / 4),
-			point = this._map.project(latlng);
+		point = this._map.project(latlng);
 		return this._map.unproject([point.x + delta, point.y - delta]);
 	},
 
@@ -34,7 +34,7 @@ L.Edit.Circle = L.Edit.SimpleShape.extend({
 
 	_resize: function (latlng) {
 		var moveLatLng = this._moveMarker.getLatLng(),
-			radius = moveLatLng.distanceTo(latlng);
+		radius = moveLatLng.distanceTo(latlng);
 
 		this._shape.setRadius(radius);
 	}
diff --git a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Marker.js b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Marker.js
index 3de6484ee..d99af78d7 100644
--- a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Marker.js
+++ b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Marker.js
@@ -56,7 +56,7 @@ L.Edit.Marker = L.Handler.extend({
 
 	_offsetMarker: function (icon, offset) {
 		var iconMarginTop = parseInt(icon.style.marginTop, 10) - offset,
-			iconMarginLeft = parseInt(icon.style.marginLeft, 10) - offset;
+		iconMarginLeft = parseInt(icon.style.marginLeft, 10) - offset;
 
 		icon.style.marginTop = iconMarginTop + 'px';
 		icon.style.marginLeft = iconMarginLeft + 'px';
diff --git a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Poly.js b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Poly.js
index 3ee4e2128..35cc6f9fc 100644
--- a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Poly.js
+++ b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Poly.js
@@ -58,7 +58,7 @@ L.Edit.Poly = L.Handler.extend({
 		this._markers = [];
 
 		var latlngs = this._poly._latlngs,
-			i, j, len, marker;
+		i, j, len, marker;
 
 		// TODO refactor holes implementation in Polygon to support it here
 
@@ -137,7 +137,7 @@ L.Edit.Poly = L.Handler.extend({
 
 	_onMarkerClick: function (e) {
 		var minPoints = L.Polygon && (this._poly instanceof L.Polygon) ? 4 : 3,
-			marker = e.target;
+		marker = e.target;
 
 		// If removing this point would create an invalid polyline/polygon don't remove
 		if (this._poly._latlngs.length < minPoints) {
diff --git a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Rectangle.js b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Rectangle.js
index 446e29f75..bc0f7d019 100644
--- a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Rectangle.js
+++ b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.Rectangle.js
@@ -3,7 +3,7 @@ L.Edit = L.Edit || {};
 L.Edit.Rectangle = L.Edit.SimpleShape.extend({
 	_createMoveMarker: function () {
 		var bounds = this._shape.getBounds(),
-			center = bounds.getCenter();
+		center = bounds.getCenter();
 
 		this._moveMarker = this._createMarker(center, this.options.moveIcon);
 		this._moveMarker.setOpacity(0);
@@ -26,9 +26,9 @@ L.Edit.Rectangle = L.Edit.SimpleShape.extend({
 
 		// Save a reference to the opposite point
 		var corners = this._getCorners(),
-			marker = e.target,
-			currentCornerIndex  = marker._cornerIndex,
-			oppositeCornerIndex = (currentCornerIndex + 4) % 8;
+		marker = e.target,
+		currentCornerIndex  = marker._cornerIndex,
+		oppositeCornerIndex = (currentCornerIndex + 4) % 8;
 
 		this._oppositeCorner = corners[ oppositeCornerIndex % 2 ?  (oppositeCornerIndex + 1) % 8 : oppositeCornerIndex ];
 		this._currentCorner  = corners[ currentCornerIndex  % 2 ?  (currentCornerIndex  + 1) % 8 : currentCornerIndex ];
@@ -39,7 +39,7 @@ L.Edit.Rectangle = L.Edit.SimpleShape.extend({
 
 	_onMarkerDragEnd: function (e) {
 		var marker = e.target,
-			bounds, center;
+		bounds, center;
 
 		// Reset move marker position to the center
 		if (marker === this._moveMarker) {
@@ -56,9 +56,9 @@ L.Edit.Rectangle = L.Edit.SimpleShape.extend({
 
 	_move: function (newCenter) {
 		var latlngs = this._shape.getLatLngs(),
-			bounds = this._shape.getBounds(),
-			center = bounds.getCenter(),
-			offset, newLatLngs = [];
+		bounds = this._shape.getBounds(),
+		center = bounds.getCenter(),
+		offset, newLatLngs = [];
 
 		// Offset the latlngs to the new center
 		for (var i = 0, l = latlngs.length; i < l; i++) {
@@ -75,7 +75,7 @@ L.Edit.Rectangle = L.Edit.SimpleShape.extend({
 	_resize: function (latlng) {
 		var bounds;
 
-		if (this._currentIndex == 1 || this._currentIndex == 5 )
+		if (this._currentIndex == 1 || this._currentIndex == 5)
 			latlng.lng = this._currentCorner.lng;
 		else if (this._currentIndex == 3 || this._currentIndex == 7)
 			latlng.lat = this._currentCorner.lat;
@@ -90,15 +90,15 @@ L.Edit.Rectangle = L.Edit.SimpleShape.extend({
 
 	_getCorners: function () {
 		var bounds = this._shape.getBounds(),
-			nw = bounds.getNorthWest(),
-			ne = bounds.getNorthEast(),
-			se = bounds.getSouthEast(),
-			sw = bounds.getSouthWest(),
-			center = bounds.getCenter(),
-			north  = L.latLng(nw.lat, center.lng),
-			south  = L.latLng(sw.lat, center.lng),
-			west   = L.latLng(center.lat, nw.lng),
-			east   = L.latLng(center.lat, ne.lng);
+		nw = bounds.getNorthWest(),
+		ne = bounds.getNorthEast(),
+		se = bounds.getSouthEast(),
+		sw = bounds.getSouthWest(),
+		center = bounds.getCenter(),
+		north  = L.latLng(nw.lat, center.lng),
+		south  = L.latLng(sw.lat, center.lng),
+		west   = L.latLng(center.lat, nw.lng),
+		east   = L.latLng(center.lat, ne.lng);
 
 		return [nw, north, ne, east, se, south, sw, west];
 	},
diff --git a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js
index 7b443516b..32caad37f 100644
--- a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js
+++ b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js
@@ -119,7 +119,7 @@ L.Edit.SimpleShape = L.Handler.extend({
 
 	_onMarkerDrag: function (e) {
 		var marker = e.target,
-			latlng = marker.getLatLng();
+		latlng = marker.getLatLng();
 
 		if (marker === this._moveMarker) {
 			this._move(latlng);
diff --git a/loleaflet/plugins/draw-0.2.4/src/edit/handler/EditToolbar.Edit.js b/loleaflet/plugins/draw-0.2.4/src/edit/handler/EditToolbar.Edit.js
index 6317c54a5..bb0c35350 100644
--- a/loleaflet/plugins/draw-0.2.4/src/edit/handler/EditToolbar.Edit.js
+++ b/loleaflet/plugins/draw-0.2.4/src/edit/handler/EditToolbar.Edit.js
@@ -141,7 +141,7 @@ L.EditToolbar.Edit = L.Handler.extend({
 
 	_enableLayerEdit: function (e) {
 		var layer = e.layer || e.target || e,
-			pathOptions;
+		pathOptions;
 
 		// Back up this layer (if haven't before)
 		this._backupLayer(layer);
diff --git a/loleaflet/plugins/draw-0.2.4/src/ext/GeometryUtil.js b/loleaflet/plugins/draw-0.2.4/src/ext/GeometryUtil.js
index 3227a4cda..7836887a7 100644
--- a/loleaflet/plugins/draw-0.2.4/src/ext/GeometryUtil.js
+++ b/loleaflet/plugins/draw-0.2.4/src/ext/GeometryUtil.js
@@ -2,9 +2,9 @@ L.GeometryUtil = L.extend(L.GeometryUtil || {}, {
 	// Ported from the OpenLayers implementation. See https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Geometry/LinearRing.js#L270
 	geodesicArea: function (latLngs) {
 		var pointsCount = latLngs.length,
-			area = 0.0,
-			d2r = L.LatLng.DEG_TO_RAD,
-			p1, p2;
+		area = 0.0,
+		d2r = L.LatLng.DEG_TO_RAD,
+		p1, p2;
 
 		if (pointsCount > 2) {
 			for (var i = 0; i < pointsCount; i++) {
diff --git a/loleaflet/plugins/draw-0.2.4/src/ext/Polygon.Intersect.js b/loleaflet/plugins/draw-0.2.4/src/ext/Polygon.Intersect.js
index d181c0275..05bc4b7bf 100644
--- a/loleaflet/plugins/draw-0.2.4/src/ext/Polygon.Intersect.js
+++ b/loleaflet/plugins/draw-0.2.4/src/ext/Polygon.Intersect.js
@@ -2,8 +2,8 @@ L.Polygon.include({
 	// Checks a polygon for any intersecting line segments. Ignores holes.
 	intersects: function () {
 		var polylineIntersects,
-			points = this._originalPoints,
-			len, firstPoint, lastPoint, maxIndex;
+		points = this._originalPoints,
+		len, firstPoint, lastPoint, maxIndex;
 
 		if (this._tooFewPointsForIntersection()) {
 			return false;
diff --git a/loleaflet/plugins/draw-0.2.4/src/ext/Polyline.Intersect.js b/loleaflet/plugins/draw-0.2.4/src/ext/Polyline.Intersect.js
index fc31a4951..eaf4836f3 100644
--- a/loleaflet/plugins/draw-0.2.4/src/ext/Polyline.Intersect.js
+++ b/loleaflet/plugins/draw-0.2.4/src/ext/Polyline.Intersect.js
@@ -3,8 +3,8 @@ L.Polyline.include({
 	// NOTE: does not support detecting intersection for degenerate cases.
 	intersects: function () {
 		var points = this._originalPoints,
-			len = points ? points.length : 0,
-			i, p, p1;
+		len = points ? points.length : 0,
+		i, p, p1;
 
 		if (this._tooFewPointsForIntersection()) {
 			return false;
@@ -39,10 +39,10 @@ L.Polyline.include({
 	// NOTE: does not support detecting intersection for degenerate cases.
 	newPointIntersects: function (newPoint, skipFirst) {
 		var points = this._originalPoints,
-			len = points ? points.length : 0,
-			lastPoint = points ? points[len - 1] : null,
-			// The previous previous line segment. Previous line segment doesn't need testing.
-			maxIndex = len - 2;
+		len = points ? points.length : 0,
+		lastPoint = points ? points[len - 1] : null,
+		// The previous previous line segment. Previous line segment doesn't need testing.
+		maxIndex = len - 2;
 
 		if (this._tooFewPointsForIntersection(1)) {
 			return false;
@@ -55,7 +55,7 @@ L.Polyline.include({
 	// Cannot have intersection when < 3 line segments (< 4 points)
 	_tooFewPointsForIntersection: function (extraPoints) {
 		var points = this._originalPoints,
-			len = points ? points.length : 0;
+		len = points ? points.length : 0;
 		// Increment length by extraPoints if present
 		len += extraPoints || 0;
 
@@ -66,7 +66,7 @@ L.Polyline.include({
 	// Don't need to check the predecessor as will never intersect.
 	_lineSegmentsIntersectsRange: function (p, p1, maxIndex, minIndex) {
 		var points = this._originalPoints,
-			p2, p3;
+		p2, p3;
 
 		minIndex = minIndex || 0;
 


More information about the Libreoffice-commits mailing list