aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript/helpers
diff options
context:
space:
mode:
authorLuc Donnet2018-03-13 15:46:28 +0100
committerGitHub2018-03-13 15:46:28 +0100
commit957ceaacac3b950d2522b166954f56c8890f20b9 (patch)
tree82bcc4e415fdf91b49b426d0e9a736dff259e87c /app/javascript/helpers
parent921d23bca18fec64fd40b393e1e63bfea3184506 (diff)
parent1d64adec6774d5dfde82ef269ffaf678dafd70e5 (diff)
downloadchouette-core-957ceaacac3b950d2522b166954f56c8890f20b9.tar.bz2
Merge pull request #371 from af83/5567-routes-map-on-line-show
5567 Disable routes by default
Diffstat (limited to 'app/javascript/helpers')
-rw-r--r--app/javascript/helpers/routes_map.coffee10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/javascript/helpers/routes_map.coffee b/app/javascript/helpers/routes_map.coffee
index 42377cd6e..de6196372 100644
--- a/app/javascript/helpers/routes_map.coffee
+++ b/app/javascript/helpers/routes_map.coffee
@@ -29,10 +29,10 @@ RoutesLayersControl = (routes, routes_map) ->
element.className = 'ol-unselectable ol-routes-layers hidden'
Object.keys(routes).forEach (id)=>
route = routes[id]
- route.active = true
+ route.active = false
label = document.createElement('a')
label.title = route.name
- label.className = 'active'
+ label.className = ''
label.innerHTML = route.name
element.appendChild label
label.addEventListener "click", =>
@@ -140,13 +140,13 @@ class RoutesMap
@map.addLayer vectorEdgesLayer
@map.addLayer vectorLnsLayer
- lineStyle: (active=true)->
+ lineStyle: (active=false)->
new ol.style.Style
stroke: new ol.style.Stroke
color: '#007fbb'
width: if active then 3 else 0
- edgeStyles: (active=true)->
+ edgeStyles: (active=false)->
new ol.style.Style
image: new ol.style.Circle
radius: 5
@@ -157,7 +157,7 @@ class RoutesMap
color: '#007fbb'
width: if active then 3 else 0
- defaultStyles: (active=true)->
+ defaultStyles: (active=false)->
new ol.style.Style
image: new ol.style.Circle
radius: 4