mapshaper 0.7.12 → 0.7.14

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/www/page.css CHANGED
@@ -22,6 +22,8 @@
22
22
  --lt-theme-col: #e6f7ff;
23
23
  --colored-text: #10699b;
24
24
  --normal-text: #333;
25
+ --left-sidebar-width: 420px;
26
+ --sidebar-resize-col: #f2c65a; /* #d6a51d; */
25
27
  }
26
28
 
27
29
 
@@ -124,6 +126,7 @@ body.map-view {
124
126
  .dialog-btn:hover:not(.disabled),
125
127
  .sidebar-btn:hover,
126
128
  .btn.header-btn:hover,
129
+ .btn.active-layer-label:hover,
127
130
  .dialog-btn.default-btn,
128
131
  .dialog-btn.selected-btn {
129
132
  background-color: var(--dk-theme-col);
@@ -199,16 +202,18 @@ body.map-view {
199
202
  margin: 0 2px 3px 0;
200
203
  }
201
204
 
202
- .btn.header-btn {
205
+ .btn.header-btn,
206
+ .btn.active-layer-label {
203
207
  color: #fff;
204
208
  border: none;
205
209
  margin-top: 0px;
206
210
  height: 29px;
207
211
  box-sizing: border-box;
208
212
  border-radius: 1px;
209
- font-size: 14px;
213
+ line-height: 1;
214
+ font-size: 13px;
210
215
  font-weight: 500;
211
- padding: 8px 8px 0px 8px;
216
+ padding: 9px 8px 0px 8px;
212
217
  }
213
218
 
214
219
  .page-header .header-btn.disabled,
@@ -247,6 +252,8 @@ body.map-view {
247
252
 
248
253
  #header-menu-btn svg {
249
254
  display: block;
255
+ width: 14px;
256
+ height: 13px;
250
257
  fill: currentColor;
251
258
  }
252
259
 
@@ -694,6 +701,10 @@ textarea:focus {
694
701
  min-width: 28px;
695
702
  }
696
703
 
704
+ .btn.sidebar-btn.hidden {
705
+ display: none;
706
+ }
707
+
697
708
  .info-box h3 {
698
709
  font-size: 19px;
699
710
  line-height: 1.1;
@@ -775,65 +786,115 @@ input[type="checkbox"]
775
786
  }
776
787
 
777
788
 
778
- /* --- Console control ------------ */
789
+ /* --- Sidebar panels ------------ */
779
790
 
780
- .console-area {
791
+ .sidebar-panel {
781
792
  right: auto;
782
- width: 495px;
793
+ width: var(--left-sidebar-width);
783
794
  max-width: 100%;
795
+ box-sizing: border-box;
796
+ border-right: 1px solid #c6c6c6; /*#cfd8dc;*/
797
+ /* box-shadow: 2px 0 8px rgba(0,0,0,0.12); */
798
+ z-index: 30;
799
+ pointer-events: none;
800
+ display: none;
801
+ }
802
+
803
+ .console-area {
784
804
  font-size: 12px;
785
805
  }
786
806
 
787
- body.console-open .map-area {
788
- left: 495px;
807
+ body.sidebar-open .map-area {
808
+ left: var(--left-sidebar-width);
809
+ }
810
+
811
+ .sidebar-resize-handle {
812
+ display: none;
813
+ position: absolute;
814
+ top: 29px;
815
+ bottom: 0;
816
+ left: calc(var(--left-sidebar-width) - 4px);
817
+ width: 8px;
818
+ z-index: 35;
819
+ cursor: ew-resize;
820
+ pointer-events: auto;
789
821
  }
790
822
 
791
- /* responsive sizing, should be 78-80 chars per line */
823
+ .sidebar-resize-handle::before {
824
+ content: "";
825
+ position: absolute;
826
+ top: 0;
827
+ bottom: 0;
828
+ left: 3px;
829
+ width: 2px;
830
+ background-color: transparent;
831
+ }
832
+
833
+ body.sidebar-open .sidebar-resize-handle {
834
+ display: block;
835
+ }
836
+
837
+ body.sidebar-resizing,
838
+ body.sidebar-resizing * {
839
+ cursor: ew-resize !important;
840
+ user-select: none;
841
+ }
842
+
843
+ body.sidebar-resizing .sidebar-resize-handle::before,
844
+ .sidebar-resize-handle:hover::before {
845
+ background-color: var(--sidebar-resize-col);
846
+ }
847
+
848
+ /* Give the console a little more line length on wide screens. */
792
849
  @media screen and (max-width: 525px) {
793
- body.console-open .map-area {
850
+ body.sidebar-open .map-area {
794
851
  display: none;
795
852
  }
796
853
  }
797
854
 
798
855
  @media screen and (min-width: 1200px) {
799
- body.console-open .map-area {
800
- left: 535px;
856
+ :root {
857
+ --left-sidebar-width: 460px;
801
858
  }
802
859
 
803
860
  .console-area {
804
- width: 535px;
805
861
  font-size: 13px;
806
862
  }
807
863
  }
808
864
 
809
865
  @media screen and (min-width: 1400px) {
810
- body.console-open .map-area {
811
- left: 575px;
866
+ :root {
867
+ --left-sidebar-width: 500px;
812
868
  }
813
869
 
814
870
  .console-area {
815
- width: 575px;
816
871
  font-size: 14px;
817
872
  }
818
873
  }
819
874
 
875
+ .sidebar-tabs {
876
+ position: absolute;
877
+ top: 85px; /* below line intersection repair link */
878
+ left: 0;
879
+ z-index: 40;
880
+ pointer-events: auto;
881
+ }
820
882
 
821
- .console {
822
- z-index: 30;
823
- pointer-events: none;
824
- display: none;
883
+ body.sidebar-open .sidebar-tabs {
884
+ left: var(--left-sidebar-width);
825
885
  }
826
886
 
827
- .console-tab {
828
- position: absolute;
829
- top: 55px; /* below line intersection repair link */
830
- left: 0;
831
- z-index: 25;
887
+ body.sidebar-tabs-over-popup .sidebar-tabs {
888
+ z-index: 90;
889
+ }
890
+
891
+ .sidebar-tab {
832
892
  writing-mode: vertical-rl;
833
893
  transform: rotate(180deg);
834
894
  background-color: var(--theme-col);
835
895
  color: white;
836
896
  padding: 9px 4px;
897
+ margin-bottom: 4px;
837
898
  border-radius: 5px 0 0 5px;
838
899
  font-size: 13px;
839
900
  font-weight: 500;
@@ -841,7 +902,8 @@ body.console-open .map-area {
841
902
  pointer-events: auto;
842
903
  }
843
904
 
844
- .console-tab:hover,
905
+ .sidebar-tab:hover,
906
+ body.layers-open .layer-tab,
845
907
  body.console-open .console-tab {
846
908
  background-color: #1A6A96;
847
909
  }
@@ -894,6 +956,68 @@ body.console-open .console-tab {
894
956
  color: #b9dffc;
895
957
  }
896
958
 
959
+ .console-help,
960
+ .console-info {
961
+ white-space: normal;
962
+ word-break: normal;
963
+ overflow-wrap: anywhere;
964
+ }
965
+
966
+ .console-help-line,
967
+ .console-info-title,
968
+ .console-info-subtitle {
969
+ white-space: pre-wrap;
970
+ }
971
+
972
+ .console-help-spacer {
973
+ height: 0.75em;
974
+ }
975
+
976
+ .console-help-table,
977
+ .console-info-table,
978
+ .console-attribute-table {
979
+ border-collapse: collapse;
980
+ margin: 2px 0 8px 0;
981
+ width: 100%;
982
+ }
983
+
984
+ .console-help-table td,
985
+ .console-info-table td,
986
+ .console-attribute-table td,
987
+ .console-attribute-table th {
988
+ padding: 1px 10px 1px 0;
989
+ vertical-align: top;
990
+ text-align: left;
991
+ font-weight: normal;
992
+ }
993
+
994
+ .console-help-table td:first-child,
995
+ .console-info-table td:first-child,
996
+ .console-attribute-table td:first-child,
997
+ .console-attribute-table th:first-child {
998
+ white-space: nowrap;
999
+ width: 1%;
1000
+ color: #b9dffc;
1001
+ }
1002
+
1003
+ .console-attribute-table tr:first-child {
1004
+ border-bottom: 1px solid rgba(255,255,255,0.35);
1005
+ }
1006
+
1007
+ .console-info-layer + .console-info-layer {
1008
+ margin-top: 1em;
1009
+ }
1010
+
1011
+ .console-info-title {
1012
+ color: #fff;
1013
+ border-bottom: 1px solid rgba(255,255,255,0.35);
1014
+ margin: 0 0 4px 0;
1015
+ }
1016
+
1017
+ .console-info-subtitle {
1018
+ margin-top: 0.65em;
1019
+ }
1020
+
897
1021
  .input-field {
898
1022
  outline: none;
899
1023
  min-width: 100px;
@@ -915,26 +1039,28 @@ body.console-open .console-tab {
915
1039
  display: block;
916
1040
  }
917
1041
 
918
- .layer-control-btn > .btn.header-btn {
1042
+ .active-layer-label {
919
1043
  white-space: nowrap;
920
- position: relative;
921
- background-color: #1A6A96;
922
- padding-left: 12px;
923
- padding-right: 12px;
924
1044
  pointer-events: auto;
925
1045
  margin-right: 20px;
926
1046
  }
927
1047
 
928
- .layer-control-btn > .btn.header-btn:hover {
929
- background-color: #094B70;
1048
+ .active-layer-label:focus,
1049
+ .active-layer-label:focus-visible {
1050
+ outline: none;
930
1051
  }
931
1052
 
932
1053
  body.simplify .layer-control-btn {
933
1054
  display: none;
934
1055
  }
935
1056
 
936
- /* On small screens, move the layer menu trigger out of the header center and
937
- render it as an icon-only floating map button. */
1057
+ @media (max-width: 850px) {
1058
+ .layer-control-btn,
1059
+ .layer-control-btn.active {
1060
+ display: none;
1061
+ }
1062
+ }
1063
+
938
1064
  @media (max-width: 700px) {
939
1065
  .info-box {
940
1066
  margin-top: 8px;
@@ -949,54 +1075,8 @@ body.simplify .layer-control-btn {
949
1075
  padding-right: 5px;
950
1076
  }
951
1077
 
952
- .layer-control-btn {
953
- width: auto;
954
- left: 9px;
955
- top: 38px; /* below the 30px header */
956
- text-align: left;
957
- }
958
-
959
- .layer-control-btn > .btn.header-btn {
960
- margin-right: 0;
961
- width: 30px;
962
- height: 30px;
963
- box-sizing: content-box;
964
- padding: 0;
965
- border-radius: 4px;
966
- border: 2px solid rgba(255, 255, 255, 0.45);
967
- display: inline-flex;
968
- align-items: center;
969
- justify-content: center;
970
- }
971
-
972
- /* The clickable header button element itself has class "layer-name", so
973
- hide text on the button directly (not a child selector). */
974
- .layer-control-btn > .btn.header-btn.layer-name {
975
- color: transparent;
976
- font-size: 0;
977
- line-height: 0;
978
- text-indent: -9999px;
979
- overflow: hidden;
980
- }
981
-
982
- /* Mobile layer-button icon */
983
- .layer-control-btn > .btn.header-btn::before {
984
- content: "";
985
- display: block;
986
- }
987
-
988
- /* Two diagonally offset squares */
989
- .layer-control-btn.icon-duo > .btn.header-btn::before {
990
- width: 13px;
991
- height: 13px;
992
- margin: 2px 0 0 2px;
993
- border: 1px solid rgba(255, 255, 255, 0.95);
994
- border-radius: 1px;
995
- box-shadow: -4px -4px 0 -1px rgba(255, 255, 255, 0.72);
996
- }
997
-
998
1078
  .mshp-main-map .basemap-overlay-buttons {
999
- top: 10px; /* map-relative offset to align with page-level layer button */
1079
+ top: 10px;
1000
1080
  right: 33px;
1001
1081
  padding: 0;
1002
1082
  background: transparent;
@@ -1035,13 +1115,61 @@ body.simplify .layer-control-btn {
1035
1115
  z-index: 90;
1036
1116
  }
1037
1117
 
1118
+ .layer-area {
1119
+ background-color: #fff;
1120
+ }
1121
+
1122
+ .layer-area .info-box {
1123
+ position: static;
1124
+ z-index: auto;
1125
+ display: block;
1126
+ box-sizing: border-box;
1127
+ width: 100%;
1128
+ height: 100%;
1129
+ min-width: 0;
1130
+ margin: 0;
1131
+ border: 0;
1132
+ border-radius: 0;
1133
+ box-shadow: none;
1134
+ }
1135
+
1136
+ .layer-area div.info-box-scrolled {
1137
+ z-index: auto;
1138
+ box-sizing: border-box;
1139
+ width: 100%;
1140
+ height: 100%;
1141
+ max-height: none;
1142
+ border-radius: 0;
1143
+ }
1144
+
1038
1145
  .layer-control .no-layer-note {
1146
+ color: #999;
1147
+ margin: 0 0 5px 0;
1148
+ }
1149
+
1150
+ .layer-add-links {
1151
+ margin: 2px 0 2px 0;
1152
+ font-size: 13px;
1153
+ line-height: 1.2;
1154
+ }
1155
+
1156
+ .layer-menu-link {
1157
+ color: var(--colored-text);
1158
+ cursor: pointer;
1159
+ }
1160
+
1161
+ .layer-menu-link:hover {
1162
+ text-decoration: underline;
1163
+ }
1164
+
1165
+ .layer-menu-link-separator {
1039
1166
  color: #777;
1040
- margin: 4px 0 5px 0;
1167
+ font-weight: bold;
1041
1168
  }
1042
1169
 
1043
1170
  .layer-menu .layer-list {
1044
- margin: 6px 0 7px 0;
1171
+ margin-top: -5px;
1172
+ /* margin: 0 0 7px 0; */
1045
1173
  }
1046
1174
 
1047
1175
  .layer-menu .layer-item {
@@ -1056,25 +1184,32 @@ body.simplify .layer-control-btn {
1056
1184
  cursor: pointer;
1057
1185
  }
1058
1186
 
1059
- .layer-menu .file-list {
1060
- padding-bottom: 4px;
1061
- }
1062
-
1063
- .layer-menu .file-list .layer-item {
1064
- padding: 0px 14px 2px 14px;
1065
- }
1066
-
1067
-
1068
1187
  .pin-all img,
1069
1188
  .layer-item img
1070
1189
  {
1071
- position: absolute;
1072
1190
  width: 16px;
1073
1191
  height: 16px;
1074
- padding: 2px;
1192
+ padding: 1px 2px 3px 2px;
1075
1193
  right: 6px;
1076
1194
  }
1077
1195
 
1196
+ .layer-item .layer-btn {
1197
+ position: absolute;
1198
+ top: 5px;
1199
+ }
1200
+
1201
+
1202
+ .layer-item .more-btn {
1203
+ position: absolute;
1204
+ right: 28px;
1205
+ width: 18px;
1206
+ height: 18px;
1207
+ opacity: 1;
1208
+ cursor: pointer;
1209
+ border-radius: 3px;
1210
+ }
1211
+
1212
+
1078
1213
  img.close-btn {
1079
1214
  opacity: 0.2;
1080
1215
  }
@@ -1087,7 +1222,6 @@ img.close-btn {
1087
1222
  float: right;
1088
1223
  height: 18px;
1089
1224
  width: 18px;
1090
- margin-top: 1px;
1091
1225
  margin-right: -3px;
1092
1226
  cursor: pointer;
1093
1227
  border-radius: 4px;
@@ -1098,23 +1232,26 @@ img.close-btn {
1098
1232
  }
1099
1233
 
1100
1234
  .pin-all img {
1235
+ position: absolute;
1101
1236
  top: 11px;
1102
1237
  cursor: pointer;
1103
1238
  }
1104
1239
 
1105
- .layer-item img.eye-btn {
1106
- top: 4px;
1107
- }
1108
1240
 
1109
- .layer-item img.close-btn {
1110
- /* top: 29px; */
1111
- bottom: 5px;
1241
+ .layer-item .more-btn::before {
1242
+ content: "";
1243
+ position: absolute;
1244
+ top: 8px;
1245
+ left: 2px;
1246
+ width: 3px;
1247
+ height: 3px;
1248
+ border-radius: 50%;
1249
+ background-color: #000;
1250
+ box-shadow: 5px 0 0 #000, 10px 0 0 #000;
1112
1251
  }
1113
1252
 
1114
- /* hide close button when not hovering */
1115
- .layer-item:not(:hover) img.close-btn,
1116
- .layer-item.dragging img.close-btn {
1117
- display: none;
1253
+ .layer-item .more-btn:hover {
1254
+ background-color: #e5e5e5;
1118
1255
  }
1119
1256
 
1120
1257
  img.eye-btn {
@@ -1134,7 +1271,6 @@ img.eye-btn {
1134
1271
  opacity: 0;
1135
1272
  }*/
1136
1273
 
1137
- img.close-btn:hover,
1138
1274
  .pinnable.active:not(.pinned):not(.invisible) img.black-eye,
1139
1275
  .pinnable.pinned:not(.active) img.green-eye,
1140
1276
  .pinnable.active.pinned:not(.invisible) img.black-eye {
@@ -1153,6 +1289,10 @@ img.close-btn:hover,
1153
1289
 
1154
1290
  .layer-item .layer-name {
1155
1291
  display: inline-block;
1292
+ max-width: 100%;
1293
+ overflow: hidden;
1294
+ text-overflow: ellipsis;
1295
+ vertical-align: top;
1156
1296
  min-height: 14px; /* For FF when content is empty */
1157
1297
  min-width: 2px;
1158
1298
  outline: none;
@@ -1164,6 +1304,10 @@ img.close-btn:hover,
1164
1304
 
1165
1305
  .layer-item .layer-name.editing {
1166
1306
  border-bottom: 1px solid transparent;
1307
+ max-width: none;
1308
+ overflow: visible;
1309
+ position: relative;
1310
+ z-index: 3;
1167
1311
  }
1168
1312
 
1169
1313
  .layer-item .layer-name::selection {
@@ -1191,7 +1335,9 @@ img.close-btn:hover,
1191
1335
  }
1192
1336
 
1193
1337
  .layer-item .row1 .col2 {
1194
- margin-right: 19px; /* room for buttons */
1338
+ margin-right: 44px; /* room for row controls */
1339
+ max-width: calc(100% - 132px);
1340
+ vertical-align: top;
1195
1341
  }
1196
1342
 
1197
1343