Skip to content

Commit bc1c14e

Browse files
committed
v0.6.108
1 parent dadb2ed commit bc1c14e

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v0.6.108
2+
* [web] Fix for coordinate precision of drawn rectangles
3+
14
v0.6.107
25
* [web] Added Display menu to configure basemaps and several other settings.
36

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mapshaper",
3-
"version": "0.6.107",
3+
"version": "0.6.108",
44
"description": "A tool for editing vector datasets for mapping and GIS.",
55
"keywords": [
66
"shapefile",

src/geom/mapshaper-rounding.mjs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,8 @@ export function getRoundingFunction(inc) {
4646
export function getBoundsPrecisionForDisplay(bbox) {
4747
var w = Math.abs(bbox[2] - bbox[0]),
4848
h = Math.abs(bbox[3] - bbox[1]),
49-
// switched to max bound, based on experience with shift-drag box info
50-
// range = Math.min(w, h) + 1e-8,
51-
range = Math.max(w, h) + 1e-8,
52-
digits = 0;
53-
while (range < 2000 && digits < 1) {
54-
range *= 10;
55-
digits++;
56-
}
49+
range = (w + h) / 2 + 1e-8,
50+
digits = Math.max(0, Math.round(3 - Math.log10(range)));
5751
return digits;
5852
}
5953

src/gui/gui-box-tool.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function BoxTool(gui, ext, nav) {
1212
var self = new EventDispatcher();
1313
var box = new HighlightBox(gui, {name: 'box-tool', persistent: true, handles: true, draggable: true});
1414
var popup = gui.container.findChild('.box-tool-options');
15-
var coords = popup.findChild('.box-coords');
15+
var coords = popup.findChild('.box-coords').hide();
1616
var _on = false;
1717
var instructionsShown = false;
1818
var alert;

www/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ <h4>Method</h4>
244244
preferentially removed, for
245245
a smoother appearance.</div></div></div></div>
246246

247-
248247
</div> <!-- option menu -->
249248

250249
<div>

0 commit comments

Comments
 (0)