diff options
Diffstat (limited to 'content/static/main.js')
| -rw-r--r-- | content/static/main.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/static/main.js b/content/static/main.js index f2c8373..3817460 100644 --- a/content/static/main.js +++ b/content/static/main.js | |||
| @@ -299,10 +299,10 @@ function page_shape__ui_shape_add(state, shape) { | |||
| 299 | 299 | ||
| 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 poly = L.polygon(positions, { color: color, fillOpacity: opacity, bubblingMouseEvents: false }) | 303 | const poly = L.polygon(positions, { color: color, fillOpacity: opacity, bubblingMouseEvents: false }) |
| 303 | .on('click', () => { | 304 | .on('click', (e) => { if (e.originalEvent.shiftKey) { select(); } }) |
| 304 | page_shape__ui_shape_select(state, shape); | 305 | .on('dblclick', select) |
| 305 | }) | ||
| 306 | .addTo(state.map); | 306 | .addTo(state.map); |
| 307 | shape.layers.push(poly); | 307 | shape.layers.push(poly); |
| 308 | } | 308 | } |
