mapshaper 0.6.105 → 0.6.107

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/mapshaper.js CHANGED
@@ -3927,7 +3927,10 @@
3927
3927
 
3928
3928
  function getValueType(val) {
3929
3929
  var type = null;
3930
- if (utils.isString(val)) {
3930
+ if (val === null || val === undefined) {
3931
+ // optimization, when scanning columns containing mostly null values
3932
+ type = null;
3933
+ } else if (utils.isString(val)) {
3931
3934
  type = 'string';
3932
3935
  } else if (utils.isNumber(val)) {
3933
3936
  type = 'number';
@@ -19290,7 +19293,7 @@
19290
19293
 
19291
19294
  // symType: point, polygon, polyline, label
19292
19295
  function applyStyleAttributes(svgObj, symType, rec, filter) {
19293
- var fields = findPropertiesBySymbolGeom(Object.keys(rec || {}), symType);
19296
+ var fields = findStylePropertiesBySymbolGeom(Object.keys(rec || {}), symType);
19294
19297
  for (var i=0, n=fields.length; i<n; i++) {
19295
19298
  if (filter && !filter(fields[i])) continue;
19296
19299
  setAttribute(svgObj, fields[i], rec[fields[i]]);
@@ -19318,7 +19321,7 @@
19318
19321
  return name in symbolPropertyTypes;
19319
19322
  }
19320
19323
 
19321
- function findPropertiesBySymbolGeom(fields, type) {
19324
+ function findStylePropertiesBySymbolGeom(fields, type) {
19322
19325
  var index = propertiesBySymbolType[type] || {};
19323
19326
  return fields.filter(function(name) {
19324
19327
  return name in index;
@@ -19467,7 +19470,7 @@
19467
19470
  var SvgProperties = /*#__PURE__*/Object.freeze({
19468
19471
  __proto__: null,
19469
19472
  applyStyleAttributes: applyStyleAttributes,
19470
- findPropertiesBySymbolGeom: findPropertiesBySymbolGeom,
19473
+ findStylePropertiesBySymbolGeom: findStylePropertiesBySymbolGeom,
19471
19474
  getSymbolDataAccessor: getSymbolDataAccessor,
19472
19475
  getSymbolPropertyAccessor: getSymbolPropertyAccessor,
19473
19476
  isSupportedSvgStyleProperty: isSupportedSvgStyleProperty,
@@ -46041,7 +46044,7 @@ ${svg}
46041
46044
  });
46042
46045
  }
46043
46046
 
46044
- var version = "0.6.105";
46047
+ var version = "0.6.107";
46045
46048
 
46046
46049
  // Parse command line args into commands and run them
46047
46050
  // Function takes an optional Node-style callback. A Promise is returned if no callback is given.
@@ -46095,7 +46098,7 @@ ${svg}
46095
46098
  }
46096
46099
  if (!loggingEnabled()) argv += ' -quiet'; // kludge to pass logging setting to subprocess
46097
46100
  var mb = Math.round(gb * 1000);
46098
- var command = [process.execPath, '--max-old-space-size=' + mb, mapshaperScript, argv].join(' ');
46101
+ var command = [`"${process.execPath}"`, '--max-old-space-size=' + mb, `"${mapshaperScript}"`, argv].join(' ');
46099
46102
  var child = require$1('child_process').exec(command, {}, function(err, stdout, stderr) {
46100
46103
  opts.callback(err);
46101
46104
  });
package/www/page.css CHANGED
@@ -325,18 +325,18 @@ div.alert-box {
325
325
  /* --- Splash screen -------------- */
326
326
 
327
327
  .import-instructions {
328
- margin: 7px 0 0 0;
328
+ margin: 8px 0 0 0;
329
+ font-size: 15px;
329
330
  }
330
331
 
331
332
  .mini-drop-area {
332
333
  border: 1.5px dashed #999;
333
- max-width: 245px;
334
+ max-width: 260px;
334
335
  border-radius: 9px;
335
- font-size: 14px;
336
- line-height: 1.5;
336
+ line-height: 1.45;
337
337
  padding: 9px 11px 6px 11px;
338
338
  margin: 9px -1px 3px -1px;
339
- min-height: 120px;
339
+ min-height: 130px;
340
340
  background: #f8fdff;
341
341
  }
342
342
 
@@ -503,7 +503,7 @@ div.alert-box {
503
503
  text-align: left;
504
504
  margin-top: 12px;
505
505
  margin-right: 20px;
506
- padding: 11px 16px 12px 18px;
506
+ padding: 12px 16px 12px 18px;
507
507
  vertical-align: top;
508
508
  display: inline-block;
509
509
  /* border: 1px solid #aaa; */
@@ -533,7 +533,7 @@ div.alert-box {
533
533
  }
534
534
 
535
535
  .info-box h3 {
536
- font-size: 19px;
536
+ font-size: 20px;
537
537
  line-height: 1.1;
538
538
  padding: 0;
539
539
  margin: 0 0 0.4em 0;
@@ -821,7 +821,7 @@ img.close-btn {
821
821
  float: right;
822
822
  height: 18px;
823
823
  width: 18px;
824
- /* margin-top: 1px; */
824
+ margin-top: 1px;
825
825
  margin-right: -3px;
826
826
  cursor: pointer;
827
827
  border-radius: 4px;
@@ -1101,11 +1101,11 @@ img.close-btn:hover,
1101
1101
  height: 100%;
1102
1102
  }
1103
1103
 
1104
- .basemap-options {
1104
+ .display-options {
1105
1105
  pointer-events: none;
1106
1106
  }
1107
1107
 
1108
- .basemap-options .info-box {
1108
+ .display-options .info-box {
1109
1109
  width: min-content;
1110
1110
  pointer-events: initial;
1111
1111
  }
@@ -1134,6 +1134,10 @@ img.close-btn:hover,
1134
1134
  color: #cc0000;
1135
1135
  }
1136
1136
 
1137
+ .basemap-note {
1138
+ font-size: 90%;
1139
+ }
1140
+
1137
1141
  .basemap-prompt {
1138
1142
  width: 100%;
1139
1143
  text-align: center;
@@ -1146,7 +1150,7 @@ img.close-btn:hover,
1146
1150
 
1147
1151
  .basemap-styles > div {
1148
1152
  display: inline-block;
1149
- margin-bottom: 6px;
1153
+ margin-bottom: 4px;
1150
1154
  }
1151
1155
 
1152
1156
  .basemap-styles > div:nth-child(even) {