mapshaper 0.6.107 → 0.6.108

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/mapshaper.js CHANGED
@@ -13545,14 +13545,8 @@
13545
13545
  function getBoundsPrecisionForDisplay(bbox) {
13546
13546
  var w = Math.abs(bbox[2] - bbox[0]),
13547
13547
  h = Math.abs(bbox[3] - bbox[1]),
13548
- // switched to max bound, based on experience with shift-drag box info
13549
- // range = Math.min(w, h) + 1e-8,
13550
- range = Math.max(w, h) + 1e-8,
13551
- digits = 0;
13552
- while (range < 2000 && digits < 1) {
13553
- range *= 10;
13554
- digits++;
13555
- }
13548
+ range = (w + h) / 2 + 1e-8,
13549
+ digits = Math.max(0, Math.round(3 - Math.log10(range)));
13556
13550
  return digits;
13557
13551
  }
13558
13552
 
@@ -46044,7 +46038,7 @@ ${svg}
46044
46038
  });
46045
46039
  }
46046
46040
 
46047
- var version = "0.6.107";
46041
+ var version = "0.6.108";
46048
46042
 
46049
46043
  // Parse command line args into commands and run them
46050
46044
  // Function takes an optional Node-style callback. A Promise is returned if no callback is given.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapshaper",
3
- "version": "0.6.107",
3
+ "version": "0.6.108",
4
4
  "description": "A tool for editing vector datasets for mapping and GIS.",
5
5
  "keywords": [
6
6
  "shapefile",
package/www/index.html CHANGED
@@ -244,7 +244,6 @@ of more acute angles are
244
244
  preferentially removed, for
245
245
  a smoother appearance.</div></div></div></div>
246
246
 
247
-
248
247
  </div> <!-- option menu -->
249
248
 
250
249
  <div>
@@ -12560,7 +12560,7 @@
12560
12560
  var self = new EventDispatcher();
12561
12561
  var box = new HighlightBox(gui, {name: 'box-tool', persistent: true, handles: true, draggable: true});
12562
12562
  var popup = gui.container.findChild('.box-tool-options');
12563
- var coords = popup.findChild('.box-coords');
12563
+ var coords = popup.findChild('.box-coords').hide();
12564
12564
  var _on = false;
12565
12565
  var instructionsShown = false;
12566
12566
  var alert;
package/www/mapshaper.js CHANGED
@@ -13545,14 +13545,8 @@
13545
13545
  function getBoundsPrecisionForDisplay(bbox) {
13546
13546
  var w = Math.abs(bbox[2] - bbox[0]),
13547
13547
  h = Math.abs(bbox[3] - bbox[1]),
13548
- // switched to max bound, based on experience with shift-drag box info
13549
- // range = Math.min(w, h) + 1e-8,
13550
- range = Math.max(w, h) + 1e-8,
13551
- digits = 0;
13552
- while (range < 2000 && digits < 1) {
13553
- range *= 10;
13554
- digits++;
13555
- }
13548
+ range = (w + h) / 2 + 1e-8,
13549
+ digits = Math.max(0, Math.round(3 - Math.log10(range)));
13556
13550
  return digits;
13557
13551
  }
13558
13552
 
@@ -46044,7 +46038,7 @@ ${svg}
46044
46038
  });
46045
46039
  }
46046
46040
 
46047
- var version = "0.6.107";
46041
+ var version = "0.6.108";
46048
46042
 
46049
46043
  // Parse command line args into commands and run them
46050
46044
  // Function takes an optional Node-style callback. A Promise is returned if no callback is given.