mapshaper 0.6.26 → 0.6.28

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.26";
3
+ var VERSION = "0.6.28";
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) {
@@ -33037,6 +33039,12 @@ ${svg}
33037
33039
  if (thatClass == -1) {
33038
33040
  if (thisClass == -1) {
33039
33041
  thisClass = classCount++;
33042
+ }
33043
+ if (Array.isArray(classToDataIndex[thisClass])) {
33044
+ if (!classToDataIndex[thisClass].includes(dataId)) {
33045
+ classToDataIndex[thisClass].push(dataId);
33046
+ }
33047
+ } else {
33040
33048
  classToDataIndex[thisClass] = [dataId];
33041
33049
  }
33042
33050
  dataToClassIndex[dataId] = thisClass;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapshaper",
3
- "version": "0.6.26",
3
+ "version": "0.6.28",
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.26";
3
+ var VERSION = "0.6.28";
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) {
@@ -33037,6 +33039,12 @@ ${svg}
33037
33039
  if (thatClass == -1) {
33038
33040
  if (thisClass == -1) {
33039
33041
  thisClass = classCount++;
33042
+ }
33043
+ if (Array.isArray(classToDataIndex[thisClass])) {
33044
+ if (!classToDataIndex[thisClass].includes(dataId)) {
33045
+ classToDataIndex[thisClass].push(dataId);
33046
+ }
33047
+ } else {
33040
33048
  classToDataIndex[thisClass] = [dataId];
33041
33049
  }
33042
33050
  dataToClassIndex[dataId] = thisClass;