leaflet-polydraw 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -11
- package/dist/polydraw.es.js +1255 -797
- package/dist/polydraw.es.js.map +1 -1
- package/dist/polydraw.umd.min.js +1 -1
- package/dist/polydraw.umd.min.js.map +1 -1
- package/dist/types/coordinate-utils.d.ts.map +1 -1
- package/dist/types/geometry-utils.d.ts.map +1 -1
- package/dist/types/managers/event-manager.d.ts +76 -4
- package/dist/types/managers/event-manager.d.ts.map +1 -1
- package/dist/types/managers/polygon-draw-manager.d.ts +2 -1
- package/dist/types/managers/polygon-draw-manager.d.ts.map +1 -1
- package/dist/types/managers/polygon-geometry-manager.d.ts +0 -16
- package/dist/types/managers/polygon-geometry-manager.d.ts.map +1 -1
- package/dist/types/managers/polygon-interaction-manager.d.ts +10 -5
- package/dist/types/managers/polygon-interaction-manager.d.ts.map +1 -1
- package/dist/types/managers/polygon-mutation-manager.d.ts +28 -9
- package/dist/types/managers/polygon-mutation-manager.d.ts.map +1 -1
- package/dist/types/map-state.d.ts.map +1 -1
- package/dist/types/polydraw.d.ts +160 -7
- package/dist/types/polydraw.d.ts.map +1 -1
- package/dist/types/styles/dynamic-styles.d.ts +3 -0
- package/dist/types/styles/dynamic-styles.d.ts.map +1 -0
- package/dist/types/turf-helper.d.ts +15 -4
- package/dist/types/turf-helper.d.ts.map +1 -1
- package/dist/types/types/polydraw-interfaces.d.ts +96 -10
- package/dist/types/types/polydraw-interfaces.d.ts.map +1 -1
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -195,14 +195,16 @@ const polyDrawControl = L.control
|
|
|
195
195
|
"mac": "metaKey",
|
|
196
196
|
"linux": "ctrlKey"
|
|
197
197
|
},
|
|
198
|
-
"subtractColor": "#D9460F",
|
|
199
198
|
"hideMarkersOnDrag": true
|
|
200
199
|
}
|
|
201
200
|
},
|
|
202
201
|
"edgeDeletion": {
|
|
203
202
|
"enabled": true,
|
|
204
|
-
"
|
|
205
|
-
|
|
203
|
+
"keys": {
|
|
204
|
+
"windows": "ctrlKey",
|
|
205
|
+
"mac": "metaKey",
|
|
206
|
+
"linux": "ctrlKey"
|
|
207
|
+
},
|
|
206
208
|
"confirmDeletion": false,
|
|
207
209
|
"minVertices": 3
|
|
208
210
|
},
|
|
@@ -280,6 +282,11 @@ const polyDrawControl = L.control
|
|
|
280
282
|
"styleClasses": ["polygon-marker", "delete"],
|
|
281
283
|
"zIndexOffset": 10000
|
|
282
284
|
},
|
|
285
|
+
"holeMarkers": {
|
|
286
|
+
"menuMarker": false,
|
|
287
|
+
"deleteMarker": true,
|
|
288
|
+
"infoMarker": false
|
|
289
|
+
},
|
|
283
290
|
"visualOptimization": {
|
|
284
291
|
"sharpAngleThreshold": 30,
|
|
285
292
|
"thresholdBoundingBox": 0.05,
|
|
@@ -290,7 +297,6 @@ const polyDrawControl = L.control
|
|
|
290
297
|
}
|
|
291
298
|
},
|
|
292
299
|
"polyLineOptions": {
|
|
293
|
-
"color": "#50622b",
|
|
294
300
|
"opacity": 1,
|
|
295
301
|
"smoothFactor": 0,
|
|
296
302
|
"noClip": true,
|
|
@@ -298,7 +304,6 @@ const polyDrawControl = L.control
|
|
|
298
304
|
"weight": 2
|
|
299
305
|
},
|
|
300
306
|
"subtractLineOptions": {
|
|
301
|
-
"color": "#50622b",
|
|
302
307
|
"opacity": 1,
|
|
303
308
|
"smoothFactor": 0,
|
|
304
309
|
"noClip": true,
|
|
@@ -307,13 +312,9 @@ const polyDrawControl = L.control
|
|
|
307
312
|
},
|
|
308
313
|
"polygonOptions": {
|
|
309
314
|
"smoothFactor": 0.3,
|
|
310
|
-
"color": "#50622b",
|
|
311
|
-
"fillColor": "#b4cd8a",
|
|
312
315
|
"noClip": true
|
|
313
316
|
},
|
|
314
317
|
"holeOptions": {
|
|
315
|
-
"color": "#aa0000",
|
|
316
|
-
"fillColor": "#ffcccc",
|
|
317
318
|
"weight": 2,
|
|
318
319
|
"opacity": 1,
|
|
319
320
|
"fillOpacity": 0.5
|
|
@@ -322,7 +323,7 @@ const polyDrawControl = L.control
|
|
|
322
323
|
"method": "concaveman",
|
|
323
324
|
"simplification": {
|
|
324
325
|
"mode": "simple",
|
|
325
|
-
"tolerance": 0.
|
|
326
|
+
"tolerance": 0.00001,
|
|
326
327
|
"highQuality": false
|
|
327
328
|
}
|
|
328
329
|
},
|
|
@@ -354,6 +355,48 @@ const polyDrawControl = L.control
|
|
|
354
355
|
"bezier": {
|
|
355
356
|
"resolution": 10000,
|
|
356
357
|
"sharpness": 0.75
|
|
358
|
+
},
|
|
359
|
+
"colors": {
|
|
360
|
+
"dragPolygons": {
|
|
361
|
+
"subtract": "#D9460F"
|
|
362
|
+
},
|
|
363
|
+
"p2p": {
|
|
364
|
+
"closingMarker": "#4CAF50"
|
|
365
|
+
},
|
|
366
|
+
"edgeHover": "#7a9441",
|
|
367
|
+
"edgeDeletion": {
|
|
368
|
+
"hover": "#D9460F"
|
|
369
|
+
},
|
|
370
|
+
"polyline": "#50622b",
|
|
371
|
+
"subtractLine": "#50622b",
|
|
372
|
+
"polygon": {
|
|
373
|
+
"border": "#50622b",
|
|
374
|
+
"fill": "#b4cd8a"
|
|
375
|
+
},
|
|
376
|
+
"hole": {
|
|
377
|
+
"border": "#aa0000",
|
|
378
|
+
"fill": "#ffcccc"
|
|
379
|
+
},
|
|
380
|
+
"styles": {
|
|
381
|
+
"controlButton": {
|
|
382
|
+
"backgroundColor": "#fff",
|
|
383
|
+
"color": "#000"
|
|
384
|
+
},
|
|
385
|
+
"controlButtonHover": {
|
|
386
|
+
"backgroundColor": "#f4f4f4"
|
|
387
|
+
},
|
|
388
|
+
"controlButtonActive": {
|
|
389
|
+
"backgroundColor": "rgb(128, 218, 255)",
|
|
390
|
+
"color": "#fff"
|
|
391
|
+
},
|
|
392
|
+
"indicatorActive": {
|
|
393
|
+
"backgroundColor": "#ffcc00"
|
|
394
|
+
},
|
|
395
|
+
"p2pMarker": {
|
|
396
|
+
"backgroundColor": "#fff",
|
|
397
|
+
"borderColor": "#50622b"
|
|
398
|
+
}
|
|
399
|
+
}
|
|
357
400
|
}
|
|
358
401
|
}
|
|
359
402
|
```
|
|
@@ -395,7 +438,10 @@ const polyDrawControl = L.control
|
|
|
395
438
|
| hideMarkersOnDrag | boolean | `true` | Hide markers during subtract drag |
|
|
396
439
|
| **edgeDeletion** | object | | Edge deletion configuration |
|
|
397
440
|
| enabled | boolean | `true` | Enable edge deletion functionality |
|
|
398
|
-
|  
|
|
441
|
+
| **keys** | object | | Platform-specific modifier keys |
|
|
442
|
+
| windows | string | `"ctrlKey"` | Windows modifier key |
|
|
443
|
+
| mac | string | `"metaKey"` | Mac modifier key |
|
|
444
|
+
| linux | string | `"ctrlKey"` | Linux modifier key |
|
|
399
445
|
| hoverColor | string | `"#D9460F"` | Color when hovering over deletable edges |
|
|
400
446
|
| confirmDeletion | boolean | `false` | Require confirmation before deleting |
|
|
401
447
|
| minVertices | number | `3` | Minimum vertices required after deletion |
|
|
@@ -458,6 +504,10 @@ const polyDrawControl = L.control
|
|
|
458
504
|
| position | number | `5` | Marker position (see MarkerPosition enum) |
|
|
459
505
|
| styleClasses | array | `["polygon-marker", "delete"]` | CSS classes for delete marker |
|
|
460
506
|
| zIndexOffset | number | `10000` | Z-index offset for delete marker |
|
|
507
|
+
| **holeMarkers** | object | | Configuration for markers on holes |
|
|
508
|
+
| menuMarker | boolean | `false` | Show menu marker on holes |
|
|
509
|
+
| deleteMarker | boolean | `true` | Show delete marker on holes |
|
|
510
|
+
| infoMarker | boolean | `false` | Show info marker on holes |
|
|
461
511
|
| **visualOptimization** | object | | Visual optimization settings |
|
|
462
512
|
| sharpAngleThreshold | number | `30` | Angle threshold for optimization |
|
|
463
513
|
| thresholdBoundingBox | number | `0.05` | Bounding box threshold |
|