mapshaper 0.7.66 → 0.7.67
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/bin/mapshaper-gui +3 -2
- package/mapshaper.js +907 -33
- package/package.json +1 -1
- package/www/index.html +6 -0
- package/www/mapshaper-gui.js +2041 -215
- package/www/mapshaper.js +907 -33
- package/www/page.css +108 -9
package/www/page.css
CHANGED
|
@@ -2021,12 +2021,24 @@ div.basemap-style-btn.active {
|
|
|
2021
2021
|
cursor: default;
|
|
2022
2022
|
}
|
|
2023
2023
|
|
|
2024
|
-
/* Over a label's
|
|
2025
|
-
than placing a label or panning the map. */
|
|
2026
|
-
.map-layers.label-
|
|
2024
|
+
/* Over a selected label's text, where a drag moves the text (or the whole
|
|
2025
|
+
label) rather than placing a label or panning the map. */
|
|
2026
|
+
.map-layers.label-text-drag {
|
|
2027
2027
|
cursor: move;
|
|
2028
2028
|
}
|
|
2029
2029
|
|
|
2030
|
+
/* Over one of a selected label's control points -- a knot, its anchor, or a
|
|
2031
|
+
callout handle -- which a drag moves on its own. Not the text's cursor,
|
|
2032
|
+
because the two are often close together or on top of each other. */
|
|
2033
|
+
.map-layers.label-handle {
|
|
2034
|
+
cursor: pointer;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
/* Over a selected label's width handle, which only moves sideways. */
|
|
2038
|
+
.map-layers.label-resize {
|
|
2039
|
+
cursor: ew-resize;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2030
2042
|
.map-layers.ruler-dragging {
|
|
2031
2043
|
cursor: grabbing;
|
|
2032
2044
|
}
|
|
@@ -2259,6 +2271,43 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
2259
2271
|
vector-effect: non-scaling-stroke;
|
|
2260
2272
|
}
|
|
2261
2273
|
|
|
2274
|
+
/* A selected text block's column: the width handle's box, drawn fainter than
|
|
2275
|
+
the box around the text, which is the label itself. */
|
|
2276
|
+
.label-cue-column {
|
|
2277
|
+
fill: none;
|
|
2278
|
+
stroke: #3a7ddc;
|
|
2279
|
+
stroke-width: 1px;
|
|
2280
|
+
stroke-dasharray: 3 3;
|
|
2281
|
+
stroke-opacity: 0.6;
|
|
2282
|
+
vector-effect: non-scaling-stroke;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
/* A selected label's width and callout handles. The callout's end at the text
|
|
2286
|
+
is filled, so that the two ends of the line read differently. */
|
|
2287
|
+
.label-cue-handle {
|
|
2288
|
+
fill: #fff;
|
|
2289
|
+
stroke: #3a7ddc;
|
|
2290
|
+
stroke-width: 1.5px;
|
|
2291
|
+
vector-effect: non-scaling-stroke;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
.label-cue-attach {
|
|
2295
|
+
fill: #3a7ddc;
|
|
2296
|
+
stroke: #fff;
|
|
2297
|
+
stroke-width: 1px;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
/* The width being dragged out for a new text block: a line's height, dashed
|
|
2301
|
+
like the other things the tool draws that are not yet a label. */
|
|
2302
|
+
.label-block-guide {
|
|
2303
|
+
fill: none;
|
|
2304
|
+
stroke: #3a7ddc;
|
|
2305
|
+
stroke-width: 1px;
|
|
2306
|
+
stroke-dasharray: 3 2;
|
|
2307
|
+
vector-effect: non-scaling-stroke;
|
|
2308
|
+
pointer-events: none;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2262
2311
|
/* The cue for a selection too large to outline label by label -- selecting a
|
|
2263
2312
|
whole layer to restyle it. A halo in the selection's own blue, the same
|
|
2264
2313
|
treatment the older styling mode uses in yellow: at that size the question
|
|
@@ -2311,6 +2360,18 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
2311
2360
|
vector-effect: non-scaling-stroke;
|
|
2312
2361
|
}
|
|
2313
2362
|
|
|
2363
|
+
/* A text block's column, the width its text wraps to, behind the box around
|
|
2364
|
+
the text itself. Fainter and dashed, because it is a limit rather than the
|
|
2365
|
+
label: the box is what a callout meets. */
|
|
2366
|
+
.label-edit-column {
|
|
2367
|
+
fill: none;
|
|
2368
|
+
stroke: #cc6acc;
|
|
2369
|
+
stroke-width: 1px;
|
|
2370
|
+
stroke-dasharray: 3 3;
|
|
2371
|
+
stroke-opacity: 0.6;
|
|
2372
|
+
vector-effect: non-scaling-stroke;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2314
2375
|
.label-edit-selection {
|
|
2315
2376
|
fill: #cc6acc;
|
|
2316
2377
|
fill-opacity: 0.3;
|
|
@@ -2441,8 +2502,8 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
2441
2502
|
pointer-events: none;
|
|
2442
2503
|
background-color: rgba(255, 255, 255, 0.85);
|
|
2443
2504
|
color: var(--colored-text);
|
|
2444
|
-
font-size:
|
|
2445
|
-
line-height:
|
|
2505
|
+
font-size: 12px;
|
|
2506
|
+
line-height: 12px;
|
|
2446
2507
|
padding: 3px 6px 4px 6px;
|
|
2447
2508
|
white-space: nowrap;
|
|
2448
2509
|
}
|
|
@@ -2533,7 +2594,7 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
2533
2594
|
and the button beside them are all the same height. */
|
|
2534
2595
|
--label-field-height: 22px;
|
|
2535
2596
|
--label-field-radius: 4px;
|
|
2536
|
-
--label-field-border: #
|
|
2597
|
+
--label-field-border: #c6c6c6;
|
|
2537
2598
|
/* The narrow column of a split row, wide enough for the longest caption
|
|
2538
2599
|
over it -- "Letter spacing", which measures 71px -- and the same in
|
|
2539
2600
|
every row of every panel, so that the field edges line up down the
|
|
@@ -2777,7 +2838,8 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
2777
2838
|
|
|
2778
2839
|
.label-style-row {
|
|
2779
2840
|
display: block;
|
|
2780
|
-
margin-top:
|
|
2841
|
+
margin-top: 2px;
|
|
2842
|
+
margin-bottom: 5px;
|
|
2781
2843
|
}
|
|
2782
2844
|
|
|
2783
2845
|
.label-style-row span,
|
|
@@ -3148,6 +3210,13 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
3148
3210
|
align-self: center;
|
|
3149
3211
|
}
|
|
3150
3212
|
|
|
3213
|
+
/* A section switched off shows only its heading (see setSectionCollapsed()),
|
|
3214
|
+
including the caption the Icon heading carries over its size column. */
|
|
3215
|
+
.label-style-panel .label-style-section.collapsed > :not(.label-style-section-title),
|
|
3216
|
+
.label-style-panel .label-style-section.collapsed .label-icon-size-caption {
|
|
3217
|
+
display: none;
|
|
3218
|
+
}
|
|
3219
|
+
|
|
3151
3220
|
/* .hidden is one class and the rule above is two, so a heading told to hide
|
|
3152
3221
|
would go on being laid out. The circle panel hides its Circles heading once
|
|
3153
3222
|
the points are circles: the panel's title says so, and the section is the
|
|
@@ -3181,6 +3250,17 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
3181
3250
|
overflow: hidden;
|
|
3182
3251
|
}
|
|
3183
3252
|
|
|
3253
|
+
/* Where text blocks are wrapped (gui-label-wrap.mjs), for the same reason. The
|
|
3254
|
+
wrapping <div> sets its own width, which the clipped box does not limit. */
|
|
3255
|
+
.label-wrap-measure {
|
|
3256
|
+
position: absolute;
|
|
3257
|
+
left: -10000px;
|
|
3258
|
+
top: -10000px;
|
|
3259
|
+
width: 1px;
|
|
3260
|
+
height: 1px;
|
|
3261
|
+
overflow: hidden;
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3184
3264
|
/* Closer to the heading above it than a row usually is, because that heading
|
|
3185
3265
|
line carries this row's "Size" caption: the gap between a caption and the
|
|
3186
3266
|
field it names is 2px everywhere else in the panel. */
|
|
@@ -3254,6 +3334,7 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
3254
3334
|
on, some off -- is both halves at once with the knob over the join. */
|
|
3255
3335
|
.label-toggle {
|
|
3256
3336
|
position: relative;
|
|
3337
|
+
top: -1px;
|
|
3257
3338
|
flex: none;
|
|
3258
3339
|
width: 26px;
|
|
3259
3340
|
height: 15px;
|
|
@@ -3300,7 +3381,7 @@ body.pan.panning .map-layers:not(.drawing) {
|
|
|
3300
3381
|
}
|
|
3301
3382
|
|
|
3302
3383
|
.label-style-section-title {
|
|
3303
|
-
margin-top:
|
|
3384
|
+
margin-top: 8px;
|
|
3304
3385
|
font-weight: 600;
|
|
3305
3386
|
color: #333;
|
|
3306
3387
|
}
|
|
@@ -3701,12 +3782,30 @@ body.dragging-color-picker * {
|
|
|
3701
3782
|
transform: scale(1.4);
|
|
3702
3783
|
}
|
|
3703
3784
|
|
|
3704
|
-
.label-align-buttons .label-panel-btn
|
|
3785
|
+
.label-align-buttons .label-panel-btn,
|
|
3786
|
+
.label-callout-buttons .label-panel-btn {
|
|
3705
3787
|
display: flex;
|
|
3706
3788
|
align-items: center;
|
|
3707
3789
|
justify-content: center;
|
|
3708
3790
|
}
|
|
3709
3791
|
|
|
3792
|
+
/* Lines like the alignment glyphs, with the arrowhead and the dot filled. */
|
|
3793
|
+
.label-callout-symbol {
|
|
3794
|
+
display: block;
|
|
3795
|
+
width: 16px;
|
|
3796
|
+
height: 16px;
|
|
3797
|
+
fill: none;
|
|
3798
|
+
stroke: currentColor;
|
|
3799
|
+
stroke-width: 1.4;
|
|
3800
|
+
stroke-linecap: round;
|
|
3801
|
+
stroke-linejoin: round;
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3804
|
+
.label-callout-symbol .fill {
|
|
3805
|
+
fill: currentColor;
|
|
3806
|
+
stroke: none;
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3710
3809
|
/* Drawn larger than the icon symbols above, which share its viewBox but not
|
|
3711
3810
|
its proportions: three rules across the middle are ink over less than half
|
|
3712
3811
|
of the box, where a circle or a square fills most of its own, so at the same
|