mapshaper 0.6.75 → 0.6.76
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 +5 -8
- package/package.json +1 -1
- package/www/index.html +21 -25
- package/www/mapshaper-gui.js +545 -553
- package/www/mapshaper.js +5 -8
- package/www/page.css +105 -51
package/www/mapshaper.js
CHANGED
|
@@ -13189,14 +13189,11 @@
|
|
|
13189
13189
|
return findVertexIds(p2.x, p2.y, arcs);
|
|
13190
13190
|
}
|
|
13191
13191
|
|
|
13192
|
-
function snapVerticesToPoint(ids, p, arcs
|
|
13192
|
+
function snapVerticesToPoint(ids, p, arcs) {
|
|
13193
13193
|
var data = arcs.getVertexData();
|
|
13194
13194
|
ids.forEach(function(idx) {
|
|
13195
|
-
if (final) {
|
|
13196
|
-
// recalculate bounding box for arc
|
|
13197
|
-
arcs.updateArcBounds(findArcIdFromVertexId(idx, data.ii));
|
|
13198
|
-
}
|
|
13199
13195
|
setVertexCoords(p[0], p[1], idx, arcs);
|
|
13196
|
+
arcs.updateArcBounds(findArcIdFromVertexId(idx, data.ii));
|
|
13200
13197
|
});
|
|
13201
13198
|
}
|
|
13202
13199
|
|
|
@@ -19959,8 +19956,8 @@
|
|
|
19959
19956
|
}
|
|
19960
19957
|
|
|
19961
19958
|
function parseScalebarUnits(str) {
|
|
19962
|
-
var isMiles = /miles
|
|
19963
|
-
var isKm = /(k\.m\.|km|kilometers?|
|
|
19959
|
+
var isMiles = /(miles?|mi[.]?|英里)$/.test(str.toLowerCase());
|
|
19960
|
+
var isKm = /(k\.m\.|km|kilometers?|kilom.tres?|公里)$/.test(str.toLowerCase());
|
|
19964
19961
|
var units = isMiles && 'mile' || isKm && 'km' || '';
|
|
19965
19962
|
return units;
|
|
19966
19963
|
}
|
|
@@ -45525,7 +45522,7 @@ ${svg}
|
|
|
45525
45522
|
});
|
|
45526
45523
|
}
|
|
45527
45524
|
|
|
45528
|
-
var version = "0.6.
|
|
45525
|
+
var version = "0.6.76";
|
|
45529
45526
|
|
|
45530
45527
|
// Parse command line args into commands and run them
|
|
45531
45528
|
// Function takes an optional Node-style callback. A Promise is returned if no callback is given.
|
package/www/page.css
CHANGED
|
@@ -65,12 +65,14 @@ body {
|
|
|
65
65
|
/* --- Themed elements -------------- */
|
|
66
66
|
|
|
67
67
|
.page-header,
|
|
68
|
-
.dialog-btn
|
|
68
|
+
.dialog-btn,
|
|
69
|
+
.sidebar-btn {
|
|
69
70
|
background-color: #1385B7;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
.colored-text,
|
|
73
74
|
.save-menu-link,
|
|
75
|
+
.context-menu-item,
|
|
74
76
|
.save-menu-btn,
|
|
75
77
|
.add-field-btn,
|
|
76
78
|
.nav-menu-item,
|
|
@@ -112,6 +114,7 @@ body {
|
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
.dialog-btn:hover:not(.disabled),
|
|
117
|
+
.sidebar-btn:hover,
|
|
115
118
|
.btn.header-btn:hover,
|
|
116
119
|
.dialog-btn.default-btn,
|
|
117
120
|
.dialog-btn.selected-btn {
|
|
@@ -228,17 +231,18 @@ body {
|
|
|
228
231
|
pointer-events: none;
|
|
229
232
|
}
|
|
230
233
|
|
|
231
|
-
.box-tool-options .btn
|
|
234
|
+
.box-tool-options .btn,
|
|
235
|
+
.selection-tool-options .btn {
|
|
232
236
|
pointer-events: initial;
|
|
233
237
|
}
|
|
234
238
|
|
|
235
|
-
.box-tool-options .info-box {
|
|
236
|
-
text-align: center;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
239
|
.box-coords {
|
|
240
|
-
margin-top:
|
|
240
|
+
margin-top: -23px;
|
|
241
241
|
pointer-events: initial;
|
|
242
|
+
position: absolute;
|
|
243
|
+
z-index: -1;
|
|
244
|
+
padding: 1px 25px;
|
|
245
|
+
right: 55px;
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
/* --- Export dialog --------- */
|
|
@@ -542,13 +546,19 @@ body.dragover #import-options-drop-area .drop-area {
|
|
|
542
546
|
text-align: center;
|
|
543
547
|
}
|
|
544
548
|
|
|
545
|
-
.info-box,.popup {
|
|
549
|
+
.info-box,.popup,.contextmenu {
|
|
546
550
|
border-radius: 9px;
|
|
547
|
-
|
|
551
|
+
border: 1px solid #ddd;
|
|
548
552
|
box-shadow: 0 3px 6px rgba(0,0,0,0.35);
|
|
553
|
+
box-shadow: 0 1px 7px rgba(0,0,0,0.15);
|
|
549
554
|
background-color: #fff;
|
|
550
555
|
}
|
|
551
556
|
|
|
557
|
+
.contextmenu-item {
|
|
558
|
+
padding: 6px;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
|
|
552
562
|
.info-box {
|
|
553
563
|
min-width: 230px;
|
|
554
564
|
word-wrap: break-word;
|
|
@@ -561,6 +571,25 @@ body.dragover #import-options-drop-area .drop-area {
|
|
|
561
571
|
/* border: 1px solid #aaa; */
|
|
562
572
|
}
|
|
563
573
|
|
|
574
|
+
.sidebar-buttons {
|
|
575
|
+
display: none;
|
|
576
|
+
position: absolute;
|
|
577
|
+
background-color: white;
|
|
578
|
+
padding: 1px 3px;
|
|
579
|
+
top: 207px;
|
|
580
|
+
right: 0;
|
|
581
|
+
z-index: 19;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.btn.sidebar-btn {
|
|
585
|
+
display: block;
|
|
586
|
+
margin-bottom: 2px;
|
|
587
|
+
margin-top: 2px;
|
|
588
|
+
font-size: 13px;
|
|
589
|
+
color: white;
|
|
590
|
+
min-width: 28px;
|
|
591
|
+
}
|
|
592
|
+
|
|
564
593
|
.info-box h3 {
|
|
565
594
|
font-size: 19px;
|
|
566
595
|
line-height: 1.1;
|
|
@@ -787,7 +816,7 @@ body.simplify .layer-control-btn {
|
|
|
787
816
|
max-height: 500px;
|
|
788
817
|
overflow: hidden;
|
|
789
818
|
overflow-y: auto;
|
|
790
|
-
padding:
|
|
819
|
+
padding: 8px 14px 9px 14px;
|
|
791
820
|
pointer-events: auto;
|
|
792
821
|
border-radius: 9px;
|
|
793
822
|
}
|
|
@@ -1014,6 +1043,14 @@ img.close-btn:hover,
|
|
|
1014
1043
|
visibility: hidden;
|
|
1015
1044
|
}*/
|
|
1016
1045
|
|
|
1046
|
+
|
|
1047
|
+
.contextmenu {
|
|
1048
|
+
font-size: 13px;
|
|
1049
|
+
position: absolute;
|
|
1050
|
+
z-index: 40;
|
|
1051
|
+
padding: 5px 0;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1017
1054
|
/* --- Popup -------------------- */
|
|
1018
1055
|
|
|
1019
1056
|
.popup {
|
|
@@ -1220,6 +1257,10 @@ div.basemap-style-btn.active img {
|
|
|
1220
1257
|
cursor: crosshair;
|
|
1221
1258
|
}
|
|
1222
1259
|
|
|
1260
|
+
.map-layers.drawing.dragging {
|
|
1261
|
+
cursor: default;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1223
1264
|
.map-layers canvas {
|
|
1224
1265
|
pointer-events: none;
|
|
1225
1266
|
position: absolute;
|
|
@@ -1249,11 +1290,19 @@ div.basemap-style-btn.active img {
|
|
|
1249
1290
|
cursor: pointer;
|
|
1250
1291
|
}
|
|
1251
1292
|
|
|
1293
|
+
.map-layers > svg text.active-label {
|
|
1294
|
+
stroke: #fac0ff; /* #efacf4; */
|
|
1295
|
+
paint-order: stroke fill;
|
|
1296
|
+
stroke-width: 4px;
|
|
1297
|
+
stroke-linecap: round;
|
|
1298
|
+
stroke-linejoin: round;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1252
1301
|
/* --- MAP BUTTONS --- */
|
|
1253
1302
|
|
|
1254
|
-
|
|
1303
|
+
/*.pointer-btn {
|
|
1255
1304
|
z-index: 2;
|
|
1256
|
-
}
|
|
1305
|
+
}*/
|
|
1257
1306
|
|
|
1258
1307
|
.nav-buttons {
|
|
1259
1308
|
z-index: 20;
|
|
@@ -1283,9 +1332,6 @@ div.basemap-style-btn.active img {
|
|
|
1283
1332
|
fill: black !important;
|
|
1284
1333
|
}
|
|
1285
1334
|
|
|
1286
|
-
.save-btn .save-menu {
|
|
1287
|
-
top: 23px;
|
|
1288
|
-
}
|
|
1289
1335
|
|
|
1290
1336
|
.inline-checkbox {
|
|
1291
1337
|
margin-left: 5px;
|
|
@@ -1297,13 +1343,23 @@ div.basemap-style-btn.active img {
|
|
|
1297
1343
|
|
|
1298
1344
|
.nav-sub-menu {
|
|
1299
1345
|
position: absolute;
|
|
1300
|
-
z-index: -1;
|
|
1346
|
+
z-index: -1;
|
|
1301
1347
|
display: none;
|
|
1302
1348
|
pointer-events: none;
|
|
1303
|
-
padding
|
|
1304
|
-
|
|
1305
|
-
|
|
1349
|
+
padding: 5px 0px;
|
|
1350
|
+
background-color: white;
|
|
1351
|
+
top: 0px;
|
|
1352
|
+
right: 24px;
|
|
1353
|
+
text-align: right;
|
|
1306
1354
|
white-space: nowrap;
|
|
1355
|
+
border-radius: 6px;
|
|
1356
|
+
border: 1px solid #ddd;
|
|
1357
|
+
box-shadow: 0 2px 5px rgba(0,0,0,0.35);
|
|
1358
|
+
box-shadow: 0 1px 7px rgba(0,0,0,0.12);
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
.pointer-btn .nav-sub-menu {
|
|
1362
|
+
top: -3px;
|
|
1307
1363
|
}
|
|
1308
1364
|
|
|
1309
1365
|
.nav-btn.open .nav-sub-menu {
|
|
@@ -1311,33 +1367,6 @@ div.basemap-style-btn.active img {
|
|
|
1311
1367
|
pointer-events: inherit;
|
|
1312
1368
|
}
|
|
1313
1369
|
|
|
1314
|
-
.nav-menu-item {
|
|
1315
|
-
background-color: #fff;
|
|
1316
|
-
float: right;
|
|
1317
|
-
clear: right;
|
|
1318
|
-
white-space: nowrap;
|
|
1319
|
-
display: inline-block;
|
|
1320
|
-
padding: 5px 7px 5px 7px;
|
|
1321
|
-
line-height: 11px;
|
|
1322
|
-
cursor: pointer;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
.nav-menu-item:hover,
|
|
1327
|
-
.nav-btn:hover .nav-sub-menu:not(.active):not(:hover) .nav-menu-item[data-name=info] {
|
|
1328
|
-
font-weight: bold;
|
|
1329
|
-
background: #e6f7ff;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
.nav-menu-item.selected {
|
|
1333
|
-
color: black;
|
|
1334
|
-
font-weight: bold;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
/* bullets https://www.w3schools.com/charsets/ref_utf_geometric.asp */
|
|
1338
|
-
.nav-sub-menu.active .nav-menu-item.selected:before {
|
|
1339
|
-
content: "\25B8 "
|
|
1340
|
-
}
|
|
1341
1370
|
|
|
1342
1371
|
.nav-btn {
|
|
1343
1372
|
position: relative;
|
|
@@ -1353,7 +1382,6 @@ div.basemap-style-btn.active img {
|
|
|
1353
1382
|
|
|
1354
1383
|
.nav-btn.selected {
|
|
1355
1384
|
background-color: black;
|
|
1356
|
-
/* border-radius: 3px; */
|
|
1357
1385
|
}
|
|
1358
1386
|
|
|
1359
1387
|
.nav-btn:hover:not(.disabled) svg *,
|
|
@@ -1365,16 +1393,43 @@ div.basemap-style-btn.active img {
|
|
|
1365
1393
|
fill: white;
|
|
1366
1394
|
}
|
|
1367
1395
|
|
|
1396
|
+
.nav-menu-item,
|
|
1397
|
+
.contextmenu-item {
|
|
1398
|
+
background-color: #fff;
|
|
1399
|
+
white-space: nowrap;
|
|
1400
|
+
padding: 6px 11px 7px 11px;
|
|
1401
|
+
line-height: 11px;
|
|
1402
|
+
cursor: pointer;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
.nav-menu-item:hover,
|
|
1406
|
+
.contextmenu-item:hover,
|
|
1407
|
+
.nav-btn:hover .nav-sub-menu:not(.active):not(:hover) .nav-menu-item[data-name=info] {
|
|
1408
|
+
color: black;
|
|
1409
|
+
background: #e6f7ff;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
.nav-menu-item.selected {
|
|
1413
|
+
color: black;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/* bullets https://www.w3schools.com/charsets/ref_utf_geometric.asp */
|
|
1417
|
+
.nav-sub-menu.active .nav-menu-item.selected:before {
|
|
1418
|
+
content: "\25B8";
|
|
1419
|
+
position: relative;
|
|
1420
|
+
margin-left: -7px;
|
|
1421
|
+
left: -2px;
|
|
1422
|
+
top: 1px;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1368
1425
|
.save-menu {
|
|
1369
1426
|
text-align: right;
|
|
1370
1427
|
padding-bottom: 5px;
|
|
1371
1428
|
}
|
|
1372
1429
|
|
|
1373
1430
|
.save-menu-entry {
|
|
1374
|
-
/* padding: 4px 7px 5px 7px; */
|
|
1375
1431
|
line-height: 11px;
|
|
1376
1432
|
padding: 4px 7px 5px 7px;
|
|
1377
|
-
display: inline-block;
|
|
1378
1433
|
background: white;
|
|
1379
1434
|
}
|
|
1380
1435
|
|
|
@@ -1410,8 +1465,7 @@ div.basemap-style-btn.active img {
|
|
|
1410
1465
|
|
|
1411
1466
|
|
|
1412
1467
|
.save-menu-link:hover {
|
|
1413
|
-
|
|
1414
|
-
font-weight: bold;
|
|
1468
|
+
color: black;
|
|
1415
1469
|
}
|
|
1416
1470
|
|
|
1417
1471
|
.save-item-label {
|