diff --git a/lib/ui/elements/drawing.mjs b/lib/ui/elements/drawing.mjs index 9bdbdd9ca5..552bba5bd0 100644 --- a/lib/ui/elements/drawing.mjs +++ b/lib/ui/elements/drawing.mjs @@ -28,8 +28,8 @@ mapp.utils.merge(mapp.dictionaries, { draw_polygon: 'Polygon', draw_rectangle: 'Rechteck', circle_config: 'Zirkel Einstellung', - draw_circle: '2 Punkt Zirkel', - draw_circle_2pt: 'Zirkel', + draw_circle: 'Zirkel', + draw_circle_2pt: '2 Punkt Zirkel', radius: 'Radius', units: 'Masseinheit', draw_line: 'Linie', @@ -375,54 +375,53 @@ function rectangle(layer) { function circle_2pt(layer) { // Set the default values - layer.draw.circle_2pt = Object.assign({ + layer.draw.circle_2pt = { layer, type: 'Circle', geometryFunction: ol.interaction.Draw.createRegularPolygon(33), - }, typeof layer.draw.circle_2pt === 'object' && layer.draw.circle_2pt || {}) - - // If a label is provided, use it, otherwise use the default - let label = layer.draw.circle_2pt?.label || mapp.dictionary.draw_circle_2pt + label: mapp.dictionary.draw_circle_2pt, + ...layer.draw.circle_2pt + } // Create the button layer.draw.circle_2pt.btn = mapp.utils.html.node`