Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
werrolf committed Jan 28, 2022
2 parents 1512184 + 0ce6c28 commit c3f1d9e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

NOTE: This version is ncompatible / not installable with Mapbender versions before v3.2.6.

## 1.4.13
* Fix feature details not viewable through context menu / click inside map if editing disabled
* Use different fallback detail popup titles for editable vs read-only objects

## 1.4.12
* Support styling features with icons (interpret `externalGraphic`, `graphicWidth`, `graphicHeight` properties)
* Support data placeholder syntax in `externalGraphic` (e.g. "/bundles/projectbundle/images/${type}.png")
Expand Down
14 changes: 6 additions & 8 deletions Resources/public/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,12 @@
});
}
var schema = this.schema_;
if (schema && schema.allowEditData) {
items.push({
text: Mapbender.trans('mb.digitizer.edit.attributes'),
callback: function () {
widget._openEditDialog(schema, feature);
}
});
}
items.push({
text: Mapbender.trans(schema && schema.allowEdit && 'mb.digitizer.edit.attributes' || 'mb.digitizer.actions.show_details'),
callback: function () {
widget._openEditDialog(schema, feature);
}
});
var featureHasId = !!widget._getUniqueItemId(schema, feature);
if (featureHasId && schema && schema.allowDelete) {
items.push({
Expand Down
9 changes: 8 additions & 1 deletion Resources/public/mapbender.element.digitizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@
*/
onFeatureClick: function(feature) {
var schema = this._getCurrentSchema();
if (feature && !this.activeToolName_ && schema.allowEditData) {
if (feature && !this.activeToolName_) {
this._openEditDialog(schema, feature);
} else if (!this.currentPopup && 'modifyFeature' === this.activeToolName_) {
// Disable hover highlighting on the feature currently selected for editing. The generated style updates break
Expand Down Expand Up @@ -567,6 +567,13 @@
zoomToFeature: function(schema, feature) {
Mapbender.Model.zoomToFeature(feature);
},
_getEditDialogPopupConfig: function(schema, dataItem) {
var options = this._superApply(arguments);
if (!(schema.popup || {}).title && schema.allowEdit) {
options.title = Mapbender.trans('mb.digitizer.edit.attributes');
}
return options;
},
createSelectControl_: function() {
var self = this;
var selectControl = new ol.interaction.Select({
Expand Down
5 changes: 2 additions & 3 deletions Resources/translations/messages.de.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
mb.digitizer:
actions:
show_details: Details anzeigen
edit.attributes: Sachdaten bearbeiten
edit.geometry: Geometrie bearbeiten
revert.geometry: Geometrieänderung zurücknehemn
useAllScheme: 'Verwende aggregierendes Schema'
displayOnInactive: 'Auch anzeigen, wenn nicht aktiv'
feature:
remove:
Expand Down Expand Up @@ -33,8 +34,6 @@ mb.digitizer:
drawCircle: 'Kreis erstellen'
drawEllipse: 'Ellipse erstellen'
drawDonut: 'Enklave in Fläche zeichnen'
remoteData:
error: 'WMS FeatureInfo Anfrage fehlgeschlagen'
style:
fillColor: Füllfarbe
color: Color
Expand Down
5 changes: 2 additions & 3 deletions Resources/translations/messages.en.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mb.digitizer:
useAllScheme: 'Use aggregating Scheme'
actions:
show_details: Show details
displayOnInactive: 'Display when not active'
edit.attributes: Edit attributes
edit.geometry: Edit geometry
Expand Down Expand Up @@ -33,8 +34,6 @@ mb.digitizer:
drawCircle: 'Draw circle'
drawEllipse: 'Draw ellipse'
drawDonut: 'Draw donut'
remoteData:
error: 'WMS FeatureInfo request failed'
style:
fillColor: Fill color
color: Color
Expand Down

0 comments on commit c3f1d9e

Please sign in to comment.