Skip to content

Commit

Permalink
1.2.1-alpha.1 to solve #2
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoupin committed Apr 13, 2019
1 parent 6e404c5 commit 98dc0fd
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 13 deletions.
62 changes: 61 additions & 1 deletion dist/Leaflet.PaintPolygon.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/Leaflet.PaintPolygon.js.map

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leaflet-paintpolygon",
"version": "1.2.0",
"version": "1.2.1-alpha.1",
"description": "Leaflet plugin to create polygon with circle, for touchscreen",
"main": "dist/Leaflet.PaintPolygon.js",
"scripts": {
Expand All @@ -27,18 +27,16 @@
},
"homepage": "https://github.com/tcoupin/leaflet-paintpolygon#readme",
"devDependencies": {
"@turf/circle": "^6.0.1",
"@turf/difference": "^6.0.1",
"@turf/union": "^6.0.1",
"turf": "7.0.0-alpha.1",
"clean-webpack-plugin": "^0.1.19",
"css-loader": "^0.28.11",
"file-loader": "^1.1.11",
"leaflet": "^1.3.1",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
"webpack": "^4.8.3",
"webpack-cli": "^2.1.3",
"webpack-dev-server": "^3.1.4"
"webpack": "^4",
"webpack-cli": "^3",
"webpack-dev-server": "^3"
},
"dependencies": {}
}
6 changes: 5 additions & 1 deletion src/PaintPolygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ const PaintPolygon = L.Control.extend({
if (this._data === undefined || this._data === null) {
this.setData(this._getCircleAsPolygon(latlng, zoom, radius));
} else {
this.setData(turf.union(this._data, this._getCircleAsPolygon(latlng, zoom, radius)));
let fc = {
type: "FeatureCollection",
features:[this._data, this._getCircleAsPolygon(latlng, zoom, radius)]
};
this.setData(turf.union(fc));
}
},
_erase: function(latlng, zoom, radius) {
Expand Down
6 changes: 3 additions & 3 deletions src/myTurf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import circle from '@turf/circle';
import union from '@turf/union';
import difference from '@turf/difference';
import circle from 'turf/src/circle';
import union from 'turf/src/union/';
import difference from 'turf/src/difference';


let turf = {
Expand Down

0 comments on commit 98dc0fd

Please sign in to comment.