mapshaper 0.7.11 → 0.7.13

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
 
@@ -775,65 +782,115 @@ input[type="checkbox"]
775
782
  }
776
783
 
777
784
 
778
- /* --- Console control ------------ */
785
+ /* --- Sidebar panels ------------ */
779
786
 
780
- .console-area {
787
+ .sidebar-panel {
781
788
  right: auto;
782
- width: 495px;
789
+ width: var(--left-sidebar-width);
783
790
  max-width: 100%;
791
+ box-sizing: border-box;
792
+ border-right: 1px solid #c6c6c6; /*#cfd8dc;*/
793
+ /* box-shadow: 2px 0 8px rgba(0,0,0,0.12); */
794
+ z-index: 30;
795
+ pointer-events: none;
796
+ display: none;
797
+ }
798
+
799
+ .console-area {
784
800
  font-size: 12px;
785
801
  }
786
802
 
787
- body.console-open .map-area {
788
- left: 495px;
803
+ body.sidebar-open .map-area {
804
+ left: var(--left-sidebar-width);
805
+ }
806
+
807
+ .sidebar-resize-handle {
808
+ display: none;
809
+ position: absolute;
810
+ top: 29px;
811
+ bottom: 0;
812
+ left: calc(var(--left-sidebar-width) - 4px);
813
+ width: 8px;
814
+ z-index: 35;
815
+ cursor: ew-resize;
816
+ pointer-events: auto;
817
+ }
818
+
819
+ .sidebar-resize-handle::before {
820
+ content: "";
821
+ position: absolute;
822
+ top: 0;
823
+ bottom: 0;
824
+ left: 3px;
825
+ width: 2px;
826
+ background-color: transparent;
827
+ }
828
+
829
+ body.sidebar-open .sidebar-resize-handle {
830
+ display: block;
831
+ }
832
+
833
+ body.sidebar-resizing,
834
+ body.sidebar-resizing * {
835
+ cursor: ew-resize !important;
836
+ user-select: none;
789
837
  }
790
838
 
791
- /* responsive sizing, should be 78-80 chars per line */
839
+ body.sidebar-resizing .sidebar-resize-handle::before,
840
+ .sidebar-resize-handle:hover::before {
841
+ background-color: var(--sidebar-resize-col);
842
+ }
843
+
844
+ /* Give the console a little more line length on wide screens. */
792
845
  @media screen and (max-width: 525px) {
793
- body.console-open .map-area {
846
+ body.sidebar-open .map-area {
794
847
  display: none;
795
848
  }
796
849
  }
797
850
 
798
851
  @media screen and (min-width: 1200px) {
799
- body.console-open .map-area {
800
- left: 535px;
852
+ :root {
853
+ --left-sidebar-width: 460px;
801
854
  }
802
855
 
803
856
  .console-area {
804
- width: 535px;
805
857
  font-size: 13px;
806
858
  }
807
859
  }
808
860
 
809
861
  @media screen and (min-width: 1400px) {
810
- body.console-open .map-area {
811
- left: 575px;
862
+ :root {
863
+ --left-sidebar-width: 500px;
812
864
  }
813
865
 
814
866
  .console-area {
815
- width: 575px;
816
867
  font-size: 14px;
817
868
  }
818
869
  }
819
870
 
871
+ .sidebar-tabs {
872
+ position: absolute;
873
+ top: 85px; /* below line intersection repair link */
874
+ left: 0;
875
+ z-index: 40;
876
+ pointer-events: auto;
877
+ }
820
878
 
821
- .console {
822
- z-index: 30;
823
- pointer-events: none;
824
- display: none;
879
+ body.sidebar-open .sidebar-tabs {
880
+ left: var(--left-sidebar-width);
825
881
  }
826
882
 
827
- .console-tab {
828
- position: absolute;
829
- top: 55px; /* below line intersection repair link */
830
- left: 0;
831
- z-index: 25;
883
+ body.sidebar-tabs-over-popup .sidebar-tabs {
884
+ z-index: 90;
885
+ }
886
+
887
+ .sidebar-tab {
832
888
  writing-mode: vertical-rl;
833
889
  transform: rotate(180deg);
834
890
  background-color: var(--theme-col);
835
891
  color: white;
836
892
  padding: 9px 4px;
893
+ margin-bottom: 4px;
837
894
  border-radius: 5px 0 0 5px;
838
895
  font-size: 13px;
839
896
  font-weight: 500;
@@ -841,7 +898,8 @@ body.console-open .map-area {
841
898
  pointer-events: auto;
842
899
  }
843
900
 
844
- .console-tab:hover,
901
+ .sidebar-tab:hover,
902
+ body.layers-open .layer-tab,
845
903
  body.console-open .console-tab {
846
904
  background-color: #1A6A96;
847
905
  }
@@ -894,6 +952,68 @@ body.console-open .console-tab {
894
952
  color: #b9dffc;
895
953
  }
896
954
 
955
+ .console-help,
956
+ .console-info {
957
+ white-space: normal;
958
+ word-break: normal;
959
+ overflow-wrap: anywhere;
960
+ }
961
+
962
+ .console-help-line,
963
+ .console-info-title,
964
+ .console-info-subtitle {
965
+ white-space: pre-wrap;
966
+ }
967
+
968
+ .console-help-spacer {
969
+ height: 0.75em;
970
+ }
971
+
972
+ .console-help-table,
973
+ .console-info-table,
974
+ .console-attribute-table {
975
+ border-collapse: collapse;
976
+ margin: 2px 0 8px 0;
977
+ width: 100%;
978
+ }
979
+
980
+ .console-help-table td,
981
+ .console-info-table td,
982
+ .console-attribute-table td,
983
+ .console-attribute-table th {
984
+ padding: 1px 10px 1px 0;
985
+ vertical-align: top;
986
+ text-align: left;
987
+ font-weight: normal;
988
+ }
989
+
990
+ .console-help-table td:first-child,
991
+ .console-info-table td:first-child,
992
+ .console-attribute-table td:first-child,
993
+ .console-attribute-table th:first-child {
994
+ white-space: nowrap;
995
+ width: 1%;
996
+ color: #b9dffc;
997
+ }
998
+
999
+ .console-attribute-table tr:first-child {
1000
+ border-bottom: 1px solid rgba(255,255,255,0.35);
1001
+ }
1002
+
1003
+ .console-info-layer + .console-info-layer {
1004
+ margin-top: 1em;
1005
+ }
1006
+
1007
+ .console-info-title {
1008
+ color: #fff;
1009
+ border-bottom: 1px solid rgba(255,255,255,0.35);
1010
+ margin: 0 0 4px 0;
1011
+ }
1012
+
1013
+ .console-info-subtitle {
1014
+ margin-top: 0.65em;
1015
+ }
1016
+
897
1017
  .input-field {
898
1018
  outline: none;
899
1019
  min-width: 100px;
@@ -915,26 +1035,23 @@ body.console-open .console-tab {
915
1035
  display: block;
916
1036
  }
917
1037
 
918
- .layer-control-btn > .btn.header-btn {
1038
+ .active-layer-label {
919
1039
  white-space: nowrap;
920
- position: relative;
921
- background-color: #1A6A96;
922
- padding-left: 12px;
923
- padding-right: 12px;
924
1040
  pointer-events: auto;
925
1041
  margin-right: 20px;
926
1042
  }
927
1043
 
928
- .layer-control-btn > .btn.header-btn:hover {
929
- background-color: #094B70;
930
- }
931
-
932
1044
  body.simplify .layer-control-btn {
933
1045
  display: none;
934
1046
  }
935
1047
 
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. */
1048
+ @media (max-width: 850px) {
1049
+ .layer-control-btn,
1050
+ .layer-control-btn.active {
1051
+ display: none;
1052
+ }
1053
+ }
1054
+
938
1055
  @media (max-width: 700px) {
939
1056
  .info-box {
940
1057
  margin-top: 8px;
@@ -949,54 +1066,8 @@ body.simplify .layer-control-btn {
949
1066
  padding-right: 5px;
950
1067
  }
951
1068
 
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
1069
  .mshp-main-map .basemap-overlay-buttons {
999
- top: 10px; /* map-relative offset to align with page-level layer button */
1070
+ top: 10px;
1000
1071
  right: 33px;
1001
1072
  padding: 0;
1002
1073
  background: transparent;
@@ -1035,13 +1106,61 @@ body.simplify .layer-control-btn {
1035
1106
  z-index: 90;
1036
1107
  }
1037
1108
 
1109
+ .layer-area {
1110
+ background-color: #fff;
1111
+ }
1112
+
1113
+ .layer-area .info-box {
1114
+ position: static;
1115
+ z-index: auto;
1116
+ display: block;
1117
+ box-sizing: border-box;
1118
+ width: 100%;
1119
+ height: 100%;
1120
+ min-width: 0;
1121
+ margin: 0;
1122
+ border: 0;
1123
+ border-radius: 0;
1124
+ box-shadow: none;
1125
+ }
1126
+
1127
+ .layer-area div.info-box-scrolled {
1128
+ z-index: auto;
1129
+ box-sizing: border-box;
1130
+ width: 100%;
1131
+ height: 100%;
1132
+ max-height: none;
1133
+ border-radius: 0;
1134
+ }
1135
+
1038
1136
  .layer-control .no-layer-note {
1137
+ color: #999;
1138
+ margin: 0 0 5px 0;
1139
+ }
1140
+
1141
+ .layer-add-links {
1142
+ margin: 2px 0 2px 0;
1143
+ font-size: 13px;
1144
+ line-height: 1.2;
1145
+ }
1146
+
1147
+ .layer-menu-link {
1148
+ color: var(--colored-text);
1149
+ cursor: pointer;
1150
+ }
1151
+
1152
+ .layer-menu-link:hover {
1153
+ text-decoration: underline;
1154
+ }
1155
+
1156
+ .layer-menu-link-separator {
1039
1157
  color: #777;
1040
- margin: 4px 0 5px 0;
1158
+ font-weight: bold;
1041
1159
  }
1042
1160
 
1043
1161
  .layer-menu .layer-list {
1044
- margin: 6px 0 7px 0;
1162
+ margin-top: -5px;
1163
+ /* margin: 0 0 7px 0; */
1045
1164
  }
1046
1165
 
1047
1166
  .layer-menu .layer-item {
@@ -1056,25 +1175,32 @@ body.simplify .layer-control-btn {
1056
1175
  cursor: pointer;
1057
1176
  }
1058
1177
 
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
1178
  .pin-all img,
1069
1179
  .layer-item img
1070
1180
  {
1071
- position: absolute;
1072
1181
  width: 16px;
1073
1182
  height: 16px;
1074
- padding: 2px;
1183
+ padding: 1px 2px 3px 2px;
1075
1184
  right: 6px;
1076
1185
  }
1077
1186
 
1187
+ .layer-item .layer-btn {
1188
+ position: absolute;
1189
+ top: 5px;
1190
+ }
1191
+
1192
+
1193
+ .layer-item .more-btn {
1194
+ position: absolute;
1195
+ right: 28px;
1196
+ width: 18px;
1197
+ height: 18px;
1198
+ opacity: 1;
1199
+ cursor: pointer;
1200
+ border-radius: 3px;
1201
+ }
1202
+
1203
+
1078
1204
  img.close-btn {
1079
1205
  opacity: 0.2;
1080
1206
  }
@@ -1087,7 +1213,6 @@ img.close-btn {
1087
1213
  float: right;
1088
1214
  height: 18px;
1089
1215
  width: 18px;
1090
- margin-top: 1px;
1091
1216
  margin-right: -3px;
1092
1217
  cursor: pointer;
1093
1218
  border-radius: 4px;
@@ -1098,23 +1223,26 @@ img.close-btn {
1098
1223
  }
1099
1224
 
1100
1225
  .pin-all img {
1226
+ position: absolute;
1101
1227
  top: 11px;
1102
1228
  cursor: pointer;
1103
1229
  }
1104
1230
 
1105
- .layer-item img.eye-btn {
1106
- top: 4px;
1107
- }
1108
1231
 
1109
- .layer-item img.close-btn {
1110
- /* top: 29px; */
1111
- bottom: 5px;
1232
+ .layer-item .more-btn::before {
1233
+ content: "";
1234
+ position: absolute;
1235
+ top: 8px;
1236
+ left: 2px;
1237
+ width: 3px;
1238
+ height: 3px;
1239
+ border-radius: 50%;
1240
+ background-color: #000;
1241
+ box-shadow: 5px 0 0 #000, 10px 0 0 #000;
1112
1242
  }
1113
1243
 
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;
1244
+ .layer-item .more-btn:hover {
1245
+ background-color: #e5e5e5;
1118
1246
  }
1119
1247
 
1120
1248
  img.eye-btn {
@@ -1134,7 +1262,6 @@ img.eye-btn {
1134
1262
  opacity: 0;
1135
1263
  }*/
1136
1264
 
1137
- img.close-btn:hover,
1138
1265
  .pinnable.active:not(.pinned):not(.invisible) img.black-eye,
1139
1266
  .pinnable.pinned:not(.active) img.green-eye,
1140
1267
  .pinnable.active.pinned:not(.invisible) img.black-eye {
@@ -1153,6 +1280,10 @@ img.close-btn:hover,
1153
1280
 
1154
1281
  .layer-item .layer-name {
1155
1282
  display: inline-block;
1283
+ max-width: 100%;
1284
+ overflow: hidden;
1285
+ text-overflow: ellipsis;
1286
+ vertical-align: top;
1156
1287
  min-height: 14px; /* For FF when content is empty */
1157
1288
  min-width: 2px;
1158
1289
  outline: none;
@@ -1164,6 +1295,10 @@ img.close-btn:hover,
1164
1295
 
1165
1296
  .layer-item .layer-name.editing {
1166
1297
  border-bottom: 1px solid transparent;
1298
+ max-width: none;
1299
+ overflow: visible;
1300
+ position: relative;
1301
+ z-index: 3;
1167
1302
  }
1168
1303
 
1169
1304
  .layer-item .layer-name::selection {
@@ -1191,7 +1326,9 @@ img.close-btn:hover,
1191
1326
  }
1192
1327
 
1193
1328
  .layer-item .row1 .col2 {
1194
- margin-right: 19px; /* room for buttons */
1329
+ margin-right: 44px; /* room for row controls */
1330
+ max-width: calc(100% - 132px);
1331
+ vertical-align: top;
1195
1332
  }
1196
1333
 
1197
1334