aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/static/main.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/content/static/main.js b/content/static/main.js
index 3817460..aa8759b 100644
--- a/content/static/main.js
+++ b/content/static/main.js
@@ -300,9 +300,12 @@ function page_shape__ui_shape_add(state, shape) {
300 if (positions.length >= 3) { 300 if (positions.length >= 3) {
301 const opacity = state.selected_shape == shape ? 0.2 : 0.04; 301 const opacity = state.selected_shape == shape ? 0.2 : 0.04;
302 const select = () => page_shape__ui_shape_select(state, shape); 302 const select = () => page_shape__ui_shape_select(state, shape);
303 const poly = L.polygon(positions, { color: color, fillOpacity: opacity, bubblingMouseEvents: false }) 303 const poly = L.polygon(positions, { color: color, fillOpacity: opacity })
304 .on('click', (e) => { if (e.originalEvent.shiftKey) { select(); } }) 304 .on('click', (ev) => { if (ev.originalEvent.shiftKey) { L.DomEvent.stopPropagation(ev); select(); } })
305 .on('dblclick', select) 305 .on('dblclick', (ev) => {
306 L.DomEvent.stopPropagation(ev);
307 select();
308 })
306 .addTo(state.map); 309 .addTo(state.map);
307 shape.layers.push(poly); 310 shape.layers.push(poly);
308 } 311 }