Skip to content

Commit

Permalink
2022.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mapcentia committed May 27, 2022
1 parent 3439fc3 commit bf6f5be
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [CalVer](https://calver.org/).

## [UNRELEASED]
## [2022.5.2] - 2022-27-5
### Changed
- Popup in vector layers is now opened when clicking the feature table. This way the close-pop-up event can be fired when clicking somewhere else. This gives a more consistent experience.

### Fixed
- When signed in as a sub-user, cached layer wouldn't work but give a 404 error. Vidi would change the 'db' URI part with 'user@db' but the URI for cached layers can't be dynamic.
- When signed in as a sub-user, cached tile layers wouldn't work but give a 404 error. Vidi changed the 'db' URI part to 'user@db' but the URI for cached layers can't be dynamic.
- Added some auto-pan-padding to accordion popups, so they don't open up outside the map.
- When selecting a vector feature it will now get the bolow shown style. Colors will not be changed. Get Feature info on raster tile layer will use the same style, but get a red outline.
```json
{
"opacity": 1,
"weight": 5,
"dashArray": "8 5",
"lineCap": "butt"
}
```

## [2022.5.1] - 2022-12-5
### Added
Expand Down
13 changes: 5 additions & 8 deletions browser/modules/layerTree/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,6 @@ module.exports = {
return apiBridgeInstance.transformResponseHandler(response, id);
},
onEachFeature: (feature, layer) => {
let me = this;
if (parsedMeta?.hover_active) {
_self.mouseOver(layer, fieldConf, template);
}
Expand Down Expand Up @@ -1811,9 +1810,7 @@ module.exports = {
$(tableContainerId).append(`<table class="table" data-show-toggle="${defaults.showToggle}" data-show-export="${defaults.showExport}" data-show-columns="${defaults.showColumns}" data-card-view="${defaults.cardView}"></table>`);

let metaDataKeys = meta.getMetaDataKeys();
let template = (typeof metaDataKeys[layerKey].infowindow !== "undefined"
&& metaDataKeys[layerKey].infowindow.template !== "")
? metaDataKeys[layerKey].infowindow.template : sqlQuery.getVectorTemplate(layerKey);
let template = sqlQuery.getVectorTemplate(layerKey);
let tableHeaders = sqlQuery.prepareDataForTableView(LAYER.VECTOR + ':' + layerKey,
JSON.parse(JSON.stringify(layerWithData[0].toGeoJSON(GEOJSON_PRECISION).features)));

Expand All @@ -1834,7 +1831,7 @@ module.exports = {
cm: tableHeaders,
autoUpdate: false,
autoPan: window.vidiConfig.autoPanPopup,
openPopUp: false,
openPopUp: true,
setViewOnSelect: true,
responsive: false,
callCustomOnload: true,
Expand Down Expand Up @@ -1876,15 +1873,15 @@ module.exports = {
for (var key in properties) {
if (properties.hasOwnProperty(key)) {
if (key.indexOf(SYSTEM_FIELD_PREFIX) === 0) {
delete properties[key];
// delete properties[key];
}
}
}

let i = properties._vidi_content.fields.length;
while (i--) {
if (properties._vidi_content.fields[i].title.indexOf(SYSTEM_FIELD_PREFIX) === 0 || properties._vidi_content.fields[i].title === `_id`) {
properties._vidi_content.fields.splice(i, 1);
// properties._vidi_content.fields.splice(i, 1);
}
}

Expand Down Expand Up @@ -2002,7 +1999,7 @@ module.exports = {
</div>`).openOn(cloud.get().map)
.on('remove', () => {
sqlQuery.resetAll();
_self.resetAllVectorLayerStyles();
// _self.resetAllVectorLayerStyles();
});
}
}
Expand Down
3 changes: 1 addition & 2 deletions browser/modules/sqlQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,7 @@ module.exports = {
getVectorTemplate: function (layerKey, multi = true) {
let metaDataKeys = meta.getMetaDataKeys();
let parsedMeta = layerTree.parseLayerMeta(metaDataKeys[layerKey]);
let template = metaDataKeys[layerKey]?.infowindow?.template || multi ? defaultTemplateForCrossMultiSelect : defaultTemplate;
template = (parsedMeta.info_template && parsedMeta.info_template !== "") ? parsedMeta.info_template : template;
template = (parsedMeta.info_template && parsedMeta.info_template !== "") ? parsedMeta.info_template : defaultTemplate;
return template;
},

Expand Down
2 changes: 1 addition & 1 deletion public/index.html.default
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
~ @author Martin Høgh <[email protected]>
~ @copyright 2013-2022 MapCentia ApS
~ @license http://www.gnu.org/licenses/#AGPL GNU AFFERO GENERAL PUBLIC LICENSE 3
~ @version UNRELEASED
~ @version 2022.5.2

-->
<html lang="en">
Expand Down

0 comments on commit bf6f5be

Please sign in to comment.