diff --git a/app/assets/stylesheets/carte.scss b/app/assets/stylesheets/carte.scss index b0e5134e7..eb9f459a8 100644 --- a/app/assets/stylesheets/carte.scss +++ b/app/assets/stylesheets/carte.scss @@ -3,74 +3,10 @@ // You can use Sass (SCSS) here: http://sass-lang.com/ @import "bootstrap"; -#carte-page { - #map { - height: 600px; - z-index: 0; - } - - #map.edit { - width: 70%; - } - - .list { - margin-bottom: 20px; - - h3 { - margin-top: 0px; - } - - ul li { - margin-bottom: 10px; - } - } -} - .leaflet-container path { cursor: url("/assets/edit.png"), default !important; } -#map.mode-create { - cursor: url("/assets/pencil.png"), crosshair !important; -} - -#map g path.leaflet-polygon { - transition: all 0.25s; - stroke-width: 4px; - stroke-opacity: 1; - stroke: #D7217E; - position: absolute; - z-index: 100; - fill: #D7217E; - fill-opacity: 0.75; -} - -#map.mode-delete path.leaflet-polygon { - cursor: no-drop !important; - - &:hover { - fill: #4D4D4D !important; - } -} - -#map div.leaflet-edge { - box-shadow: 0 0 0 2px #FFFFFF, 0 0 10px rgba(0, 0, 0, 0.35); - border: 5px solid #D7217E; - border-radius: 10px; - transition: opacity 0.25s; - cursor: move; - opacity: 0; - pointer-events: none; - box-sizing: border-box; - width: 0 !important; - height: 0 !important; -} - -#map.mode-edit div.leaflet-edge { - opacity: 1; - pointer-events: all; -} - .info { padding: 6px 8px; font: 14px/16px Arial, Helvetica, sans-serif; diff --git a/app/assets/stylesheets/new_design/map.scss b/app/assets/stylesheets/new_design/map.scss index c7cb4c564..aa30790d2 100644 --- a/app/assets/stylesheets/new_design/map.scss +++ b/app/assets/stylesheets/new_design/map.scss @@ -1,4 +1,3 @@ -#map, .carte { height: 400px; margin-bottom: 16px; diff --git a/app/javascript/new_design/carto.js b/app/javascript/new_design/carto.js deleted file mode 100644 index 310c8429b..000000000 --- a/app/javascript/new_design/carto.js +++ /dev/null @@ -1,25 +0,0 @@ -import { getData } from '../shared/data'; -import { - initMap, - drawCadastre, - drawQuartiersPrioritaires, - drawUserSelection -} from '../shared/carte'; - -function initialize() { - const element = document.getElementById('map'); - - if (element) { - const data = getData('carto'); - const map = initMap(element, data.position); - - // draw external polygons - drawCadastre(map, data); - drawQuartiersPrioritaires(map, data); - - // draw user polygon - drawUserSelection(map, data); - } -} - -addEventListener('turbolinks:load', initialize); diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 75f75f5d0..df20804b9 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -14,7 +14,6 @@ import '../shared/remote-input'; import '../shared/franceconnect'; import '../shared/toggle-target'; -import '../new_design/carto'; import '../new_design/dropdown'; import '../new_design/form-validation'; import '../new_design/select2';