Skip to content

Commit

Permalink
Backport: #641 + some other minor UX improvements (#649)
Browse files Browse the repository at this point in the history
* update version info

* Fixes invalid attempt to destructure non-iterable instance when "Add geometry to feature response" is enabled on QGIS project (#641)

* 🐛 Use right variable to get x and y

* ✨ Show only four decimal numbers on query or query bbox coordinates

* ✨ Show only four decimal numbers , if map in degrees, or two decimal numer if in meter, on query or query bbox coordinates

* Clean code - spaces

* Handle reset of strictly nested dependencies (search inputs) (#643)

* Fix #642 in v3.8.x

* remove useful "has_select" + comments

* 🐛 Aligned with afa5af6

* Remove f mispelling

---------

Co-authored-by: Raruto <[email protected]>

* 3.10.1-alpha.0

* 🐛 Ux sidebar open on mobile #648

* 💄 center Layer name and layer tools on layer header result

* ✨ Show relation feature form structure in new content intead inside table.

---------

Co-authored-by: Raruto <[email protected]>
  • Loading branch information
volterra79 and Raruto authored Aug 6, 2024
1 parent 690b3f6 commit 455fe64
Show file tree
Hide file tree
Showing 32 changed files with 955 additions and 969 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# G3W-CLIENT v3.10.0
# G3W-CLIENT v3.10.1-alpha.0

[![License](https://img.shields.io/badge/license-MPL%202-blue.svg?style=flat)](LICENSE)

Expand Down Expand Up @@ -357,8 +357,8 @@ All notable changes to this project are documented in the [releases](https://git
---

**Compatibile with:**
[![g3w-admin version](https://img.shields.io/badge/g3w--admin-3.7-1EB300.svg?style=flat)](https://github.com/g3w-suite/g3w-admin/tree/v.3.7.x)
[![g3w-suite-docker version](https://img.shields.io/badge/g3w--suite--docker-3.7-1EB300.svg?style=flat)](https://github.com/g3w-suite/g3w-suite-docker/tree/v3.7.x)
[![g3w-admin version](https://img.shields.io/badge/g3w--admin-3.8-1EB300.svg?style=flat)](https://github.com/g3w-suite/g3w-admin/tree/v.3.8.x)
[![g3w-suite-docker version](https://img.shields.io/badge/g3w--suite--docker-3.8-1EB300.svg?style=flat)](https://github.com/g3w-suite/g3w-suite-docker/tree/v3.8.x)

---

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "g3w-client",
"version": "3.10.0",
"version": "3.10.1-alpha.0",
"description": "Gis3W WebGIS Client",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 3 additions & 7 deletions src/app/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const DOWNLOAD_FORMATS = {
},
download_pdf: {
format: 'pdf',
url: 'pdf'
url: 'pdf'
},
};

Expand Down Expand Up @@ -402,12 +402,8 @@ export const TOC_THEMES_INIT_STATUS = 'collapsed';
*/
export const VIEWPORT = {
resize: {
map: {
min: 200
},
content: {
min: 200
}
map: { min: 200 },
content: { min: 200 },
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/core/layers/features/featuresstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ proto._updateFeature = function(feature) {
});
};

proto.setFeatures = function(features) {
proto.setFeatures = function(features = []) {
this._features = features;
};

Expand Down
8 changes: 6 additions & 2 deletions src/app/core/layers/features/olfeaturesstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ proto.getLength = function() {
};

//overwrite
proto.setFeatures = function(features=[]) {
features.forEach(feature => this._features.push(feature));
proto.setFeatures = function(features = []) {
//remove features
this._features.clear();
//add new features
this.addFeatures(features);
this._features.dispatchEvent('change');
};
// overwrite
proto.readFeatures = function() {
Expand Down
14 changes: 7 additions & 7 deletions src/app/gui/fields/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import VueField from 'components/FieldVue.vue';

const Fields = {
simple_field: Text,
text_field: Text,
link_field: Link,
image_field: Image,
geo_field: Geo,
photo_field: Image,
media_field: Media,
vue_field: VueField
text_field: Text,
link_field: Link,
image_field: Image,
geo_field: Geo,
photo_field: Image,
media_field: Media,
vue_field: VueField
};

module.exports = Fields;
22 changes: 11 additions & 11 deletions src/app/gui/fields/fieldsservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ const URLPattern = /^(https?:\/\/[^\s]+)/g;
const PhotoPattern = /[^\s]+.(png|jpg|jpeg|gif)$/g;

const FieldType = {
SIMPLE:'simple',
GEO:'geo',
LINK:'link',
PHOTO: 'photo',
PHOTOLINK: "photolink",
IMAGE:'image',
POINTLINK:'pointlink',
ROUTE: 'route',
VUE: 'vue'
SIMPLE: 'simple',
GEO: 'geo',
LINK: 'link',
PHOTO: 'photo',
PHOTOLINK: 'photolink',
IMAGE: 'image',
POINTLINK: 'pointlink',
ROUTE: 'route',
VUE: 'vue'
};

module.exports = {
Expand All @@ -27,9 +27,9 @@ module.exports = {
*/
getType(field) {
let type = field.type;
if (type !== 'vue'){
if ('vue' !== type){
const fieldValue = field.value;
const value = fieldValue && toRawType(fieldValue) === 'Object' && !fieldValue.coordinates && !fieldValue.vue ? fieldValue.value : fieldValue;
const value = fieldValue && 'Object' === toRawType(fieldValue) && !fieldValue.coordinates && !fieldValue.vue ? fieldValue.value : fieldValue;
if (!value) {
type = FieldType.SIMPLE;
} else if (value && typeof value == 'object') {
Expand Down
Loading

0 comments on commit 455fe64

Please sign in to comment.