Skip to content

Conversation

@frwg
Copy link
Contributor

@frwg frwg commented Feb 17, 2025

stop propagation of click event and adjust layout

enable geojson export

Adjust Layout of export checkbox

export button only when export allowed

make export method overridable

refactor

adjust geometryexport

stop propagation of click event and adjust layout

enable geojson export

Adjust Layout of export checkbox

export button only when export allowed

make export method overridable

refactor

adjust geometryexport
@frwg frwg requested a review from Phocacius February 17, 2025 11:12
@astroidex
Copy link
Member

  • Testing
allowGeometryExport: true

type: 'button',
title: Mapbender.trans('mb.digitizer.toolset.exportSelected')
})
.addClass('btn btn-default -fn-export-selected')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button's style does not fit into the style of the other buttons:

grafik

Also, it does not really fit into the geometry manipulation group. I'd either put it into the first button group or make it its own group.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


{%- block table_buttons -%}
<button class="-fn-check-for-export btn" title="{{ 'mb.digitizer.feature.export.check' | trans }}">
<i class="fa fas fa-square-o"></i>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

square-o existed in Font Awesome 4, but was already removed in Font Awesome 5. https://fontawesome.com/search?q=square&o=r&ic=free

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to fa-square

revert.geometry: Geometrieänderung zurücknehmen
intersection.error: Ungültige Geometrie
feature:
export:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add translations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are already there, just look one line below :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean in English, French, etc.

registerButtonEvents: function(schema, $table) {
var self = this;

$table.on('click', 'tbody > tr .-fn-check-for-export', function(e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the specific tbody > tr and not just the .fn-check-for-export?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I did not want to break the pattern used for the other click events

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I see. I'd vote for removing the tbody > tr for all of the click listeners, the more separation between markup and logic the more maintainable the code

@astroidex
Copy link
Member

allowGeometryExport: true

For discussion

  • This will add the export to geoJson. But maybe in the future we would like to offer more formats for export. How can we solve that?
  • Would geometryExportFormats: [geojson,gpx] be an option?
  • How can we display more than one format in the form?
  • Export of data will be relevant for search, digitizer, sketch, data upload. Shall we develop a core exporter that generates the export data?

@astroidex astroidex self-requested a review November 25, 2025 12:54
@astroidex astroidex added this to the major milestone Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants