diff --git a/CHANGELOG.md b/CHANGELOG.md index e6e4dda9..cbf02255 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ v0.6.46 * Added save to clipboard option to web UI export menu. +* In -each expressions, `this.geojson` setter now accepts nulls and FeatureCollectsions in addition to single Features. v0.6.45 * Added -o hoist= option for moving GeoJSON Feature properties to the root of each Feature. diff --git a/REFERENCE.md b/REFERENCE.md index 0c4b8802..de3c806d 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -586,7 +586,8 @@ All layer types - `this.layer_name` Name of the layer, or `""` if layer is unnamed. - `this.properties` Data properties (also available as local variables) (read/write) - `this.layer` Object with "name" and "data" properties -- `this.geojson` (read/write) Converts each feature to a GeoJSON Feature object. +- `this.geojson` (getter) Returns each feature as a GeoJSON Feature object. +- `this.geojson=` (setter) Update target layer with GeoJSON. Point layers - `this.coordinates` An array of [x, y] coordinates with one or more members, or null (read/write) diff --git a/package-lock.json b/package-lock.json index 6d7db2e6..d1f1794a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mapshaper", - "version": "0.6.45", + "version": "0.6.46", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mapshaper", - "version": "0.6.45", + "version": "0.6.46", "license": "MPL-2.0", "dependencies": { "@placemarkio/tokml": "^0.3.3", diff --git a/package.json b/package.json index af2b97bc..ea7d4837 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapshaper", - "version": "0.6.45", + "version": "0.6.46", "description": "A tool for editing vector datasets for mapping and GIS.", "keywords": [ "shapefile", diff --git a/src/gui/gui-export-control.mjs b/src/gui/gui-export-control.mjs index b9849f69..5d962827 100644 --- a/src/gui/gui-export-control.mjs +++ b/src/gui/gui-export-control.mjs @@ -27,7 +27,7 @@ export var ExportControl = function(gui) { return; } - new SimpleButton(menu.findChild('.save-btn').addClass('default-btn')).on('click', onExportClick); + new SimpleButton(menu.findChild('#export-btn').addClass('default-btn')).on('click', onExportClick); gui.addMode('export', turnOn, turnOff, exportBtn); gui.keyboard.onMenuSubmit(menu, onExportClick); var savePreferenceCheckbox; diff --git a/src/gui/gui-popup.mjs b/src/gui/gui-popup.mjs index 34cb4502..5c39503c 100644 --- a/src/gui/gui-popup.mjs +++ b/src/gui/gui-popup.mjs @@ -128,8 +128,8 @@ export function Popup(gui, toNext, toPrev) { var popup = showPopupAlert('', 'Add field'); var el = popup.container(); el.addClass('option-menu'); - var html = `
-
+ var html = `
+
Apply
assign value to all records`; el.html(html); diff --git a/www/index.html b/www/index.html index 36713b7e..e4a58469 100644 --- a/www/index.html +++ b/www/index.html @@ -156,7 +156,7 @@

File format

-
+
-
+
save to clipboard
- -
Export
- + +
Export
diff --git a/www/page.css b/www/page.css index 6a09fc7f..dd3cf57b 100644 --- a/www/page.css +++ b/www/page.css @@ -235,6 +235,7 @@ body { .export-options table { margin: 0; border-collapse: collapse; + border-spacing: 0; width: 100%; } @@ -280,7 +281,7 @@ body { .alert-title { line-height: 1.1; font-weight: bold; - margin-bottom: 5px; + margin-bottom: 7px; } div.alert-title, div.error-message { @@ -467,6 +468,7 @@ body.dragover #import-options-drop-area .drop-area { margin: 0 0 5px 0; } + #mshp-not-supported { display: none; z-index: 100; @@ -1134,7 +1136,7 @@ img.close-btn:hover, .basemap-styles > div { display: inline-block; - margin-bottom: 8px; + margin-bottom: 6px; } .basemap-styles > div:nth-child(even) {