Implement atomic operations on MapEditor
This commit is contained in:
parent
d3ea20968e
commit
05e408225b
9 changed files with 258 additions and 101 deletions
9
app/views/champs/carte/index.js.erb
Normal file
9
app/views/champs/carte/index.js.erb
Normal file
|
@ -0,0 +1,9 @@
|
|||
<%= render_flash(timeout: 5000, fixed: true) %>
|
||||
|
||||
<%= render_to_element("#{@selector} + .geo-areas",
|
||||
partial: 'shared/champs/carte/geo_areas',
|
||||
locals: { champ: @champ, error: @error }) %>
|
||||
|
||||
<% if @update_cadastres %>
|
||||
<%= fire_event('cadastres:update', { featureCollection: @champ.to_feature_collection }.to_json) %>
|
||||
<% end %>
|
|
@ -4,8 +4,4 @@
|
|||
partial: 'shared/champs/carte/geo_areas',
|
||||
locals: { champ: @champ, error: @error }) %>
|
||||
|
||||
<% if feature_enabled?(:new_map_editor) %>
|
||||
<%= fire_event('map:update', { featureCollection: @champ.to_feature_collection }.to_json) %>
|
||||
<% else %>
|
||||
<%= fire_event('carte:update', { selector: @selector, data: @champ.to_render_data }.to_json) %>
|
||||
<% end %>
|
||||
<%= fire_event('carte:update', { selector: @selector, data: @champ.to_render_data }.to_json) %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue