mapshaper 0.5.86 → 0.5.87

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ v0.5.87
2
+ * Added undo/redo to the "drag vertices" interactive editing mode.
3
+
1
4
  v0.5.86
2
5
  * Added keyboard commands for undo/redo for interactive point and label positioning.
3
6
 
package/mapshaper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.5.85";
3
+ var VERSION = "0.5.86";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -5362,6 +5362,10 @@
5362
5362
  return i - i2;
5363
5363
  };
5364
5364
 
5365
+ this.getVertex2 = function(i) {
5366
+ return [_xx[i], _yy[i]];
5367
+ };
5368
+
5365
5369
  this.getVertex = function(arcId, nth) {
5366
5370
  var i = this.indexOfVertex(arcId, nth);
5367
5371
  return {
@@ -38088,7 +38092,8 @@ ${svg}
38088
38092
  }
38089
38093
 
38090
38094
  function calcArrowSize(d) {
38091
- var totalLen = d.radius || d.length || d.r || 0,
38095
+ // don't display arrows with negative length
38096
+ var totalLen = Math.max(d.radius || d.length || d.r || 0, 0),
38092
38097
  scale = 1,
38093
38098
  o = initArrowSize(d); // calc several parameters
38094
38099
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapshaper",
3
- "version": "0.5.86",
3
+ "version": "0.5.87",
4
4
  "description": "A tool for editing vector datasets for mapping and GIS.",
5
5
  "keywords": [
6
6
  "shapefile",