diff options
| author | Zog | 2018-03-02 11:06:24 +0100 |
|---|---|---|
| committer | Zog | 2018-03-02 11:06:24 +0100 |
| commit | 54fd846e3d8130bd126d684f3834260affc90bfe (patch) | |
| tree | 6564b0d41b340791e178a308980d63d3730e0189 /app | |
| parent | 897d0ad6b48f063f40144a1dbb770f4fbc5f96f0 (diff) | |
| download | chouette-core-enhance-map-with-several-routes.tar.bz2 | |
Show labels on a signle columnenhance-map-with-several-routes
Display full name on hover
Diffstat (limited to 'app')
| -rw-r--r-- | app/assets/stylesheets/OpenLayers/custom.sass | 15 | ||||
| -rw-r--r-- | app/javascript/helpers/routes_map.coffee | 3 |
2 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/stylesheets/OpenLayers/custom.sass b/app/assets/stylesheets/OpenLayers/custom.sass index 21f5233e5..013c056d6 100644 --- a/app/assets/stylesheets/OpenLayers/custom.sass +++ b/app/assets/stylesheets/OpenLayers/custom.sass @@ -7,16 +7,15 @@ right: 42px top: .5em padding: 0 - display: flex - justify-content: space-between - flex-wrap: wrap margin: 5px -5px - max-width: 80% + width: 30% background-color: transparentize(white, 0.2) border-radius: 3px - div - list-style-type: none - flex: 1 0 15% + max-height: 90% + overflow-y: scroll + a + display: block + width: calc(100% - 10px) border: 1px solid $lightgrey padding: 5px margin: 5px @@ -27,6 +26,8 @@ text-overflow: ellipsis overflow: hidden font-size: 0.6em + &:hover + text-decoration: none &.active background: $blue diff --git a/app/javascript/helpers/routes_map.coffee b/app/javascript/helpers/routes_map.coffee index 479169995..42377cd6e 100644 --- a/app/javascript/helpers/routes_map.coffee +++ b/app/javascript/helpers/routes_map.coffee @@ -30,7 +30,8 @@ RoutesLayersControl = (routes, routes_map) -> Object.keys(routes).forEach (id)=> route = routes[id] route.active = true - label = document.createElement('div') + label = document.createElement('a') + label.title = route.name label.className = 'active' label.innerHTML = route.name element.appendChild label |
