mapshaper 0.6.27 → 0.6.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.6.27";
3
+ var VERSION = "0.6.29";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -27621,7 +27621,9 @@ ${svg}
27621
27621
 
27622
27622
  cli.checkCommandEnv('i');
27623
27623
  if (opts.stdin) {
27624
- return importFile('/dev/stdin', opts);
27624
+ dataset = importFile('/dev/stdin', opts);
27625
+ catalog.addDataset(dataset);
27626
+ return dataset;
27625
27627
  }
27626
27628
 
27627
27629
  if (files.length > 0 === false) {
@@ -38418,9 +38420,11 @@ ${svg}
38418
38420
 
38419
38421
  // @geoType: optional geometry type (polygon, polyline, point, null);
38420
38422
  ctx.layer_exists = function(name, geoType) {
38421
- var targets = catalog.findCommandTargets(name, geoType);
38422
- if (targets.length === 0) return false;
38423
- return true;
38423
+ try {
38424
+ var targets = catalog.findCommandTargets(name, geoType);
38425
+ if (targets.length > 0) return true;
38426
+ } catch(e) {}
38427
+ return false;
38424
38428
  };
38425
38429
 
38426
38430
  ctx.file_exists = function(file) {
@@ -40947,7 +40951,7 @@ ${svg}
40947
40951
  } else {
40948
40952
  moduleName = opts.module;
40949
40953
  }
40950
- if (moduleFile) {
40954
+ if (moduleFile && !require$1('path').isAbsolute(moduleFile)) {
40951
40955
  moduleFile = require$1('path').join(process.cwd(), moduleFile);
40952
40956
  }
40953
40957
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapshaper",
3
- "version": "0.6.27",
3
+ "version": "0.6.29",
4
4
  "description": "A tool for editing vector datasets for mapping and GIS.",
5
5
  "keywords": [
6
6
  "shapefile",
@@ -10953,7 +10953,7 @@
10953
10953
  _activeLyr.style = getActiveStyle(_activeLyr.layer, gui.state.dark_basemap);
10954
10954
  _activeLyr.active = true;
10955
10955
 
10956
- if (e.flags.same_table && !e.flags.proj) {
10956
+ if (popupCanStayOpen(e.flags)) {
10957
10957
  // data may have changed; if popup is open, it needs to be refreshed
10958
10958
  gui.dispatchEvent('popup-needs-refresh');
10959
10959
  } else if (_hit) {
@@ -11045,6 +11045,15 @@
11045
11045
  flags.union || flags.mosaic || flags.snap || flags.clean || false;
11046
11046
  }
11047
11047
 
11048
+ // Test if an update allows hover popup to stay open
11049
+ function popupCanStayOpen(flags) {
11050
+ // if (arcsMayHaveChanged(flags)) return false;
11051
+ if (flags.points || flags.proj) return false;
11052
+ if (!flags.same_table) return false;
11053
+ return true;
11054
+ }
11055
+
11056
+
11048
11057
  // Update map frame after user navigates the map in frame edit mode
11049
11058
  function updateFrameExtent() {
11050
11059
  var frameLyr = internal.findFrameLayer(model);
package/www/mapshaper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.6.27";
3
+ var VERSION = "0.6.29";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -27621,7 +27621,9 @@ ${svg}
27621
27621
 
27622
27622
  cli.checkCommandEnv('i');
27623
27623
  if (opts.stdin) {
27624
- return importFile('/dev/stdin', opts);
27624
+ dataset = importFile('/dev/stdin', opts);
27625
+ catalog.addDataset(dataset);
27626
+ return dataset;
27625
27627
  }
27626
27628
 
27627
27629
  if (files.length > 0 === false) {
@@ -38418,9 +38420,11 @@ ${svg}
38418
38420
 
38419
38421
  // @geoType: optional geometry type (polygon, polyline, point, null);
38420
38422
  ctx.layer_exists = function(name, geoType) {
38421
- var targets = catalog.findCommandTargets(name, geoType);
38422
- if (targets.length === 0) return false;
38423
- return true;
38423
+ try {
38424
+ var targets = catalog.findCommandTargets(name, geoType);
38425
+ if (targets.length > 0) return true;
38426
+ } catch(e) {}
38427
+ return false;
38424
38428
  };
38425
38429
 
38426
38430
  ctx.file_exists = function(file) {
@@ -40947,7 +40951,7 @@ ${svg}
40947
40951
  } else {
40948
40952
  moduleName = opts.module;
40949
40953
  }
40950
- if (moduleFile) {
40954
+ if (moduleFile && !require$1('path').isAbsolute(moduleFile)) {
40951
40955
  moduleFile = require$1('path').join(process.cwd(), moduleFile);
40952
40956
  }
40953
40957
  try {