From 982ffd522878f765c33d2fe05c49dfb00e63359a Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 6 Oct 2016 15:06:18 -0500 Subject: [PATCH] fix map header and scrolling (#11054) Checked across browsers and platforms. Crossing fingers now :D haha --- client/less/map.less | 14 +++++++++++++- .../app/routes/challenges/components/map/Map.jsx | 8 ++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/client/less/map.less b/client/less/map.less index 86babb3a3e..8e6c54c7db 100644 --- a/client/less/map.less +++ b/client/less/map.less @@ -54,13 +54,25 @@ width: 100%; } +.map-fixed-header { + position: fixed; + background: white; + width: 100%; + padding-top: 5px; + z-index: 1; + left: 0; + top: 0; +} .drawer .map-fixed-header { padding-top: 30px; + position: static; + margin-bottom: -100px; } .map-accordion { width: 100%; + margin-top: 100px; max-width: 700px; overflow-y: auto; @@ -237,7 +249,7 @@ padding-left: 0; } .map-accordion { - top: 180px; + top: 160px; h2 { margin: 15px 0; a { diff --git a/common/app/routes/challenges/components/map/Map.jsx b/common/app/routes/challenges/components/map/Map.jsx index a0ff9d6d55..e340b96696 100644 --- a/common/app/routes/challenges/components/map/Map.jsx +++ b/common/app/routes/challenges/components/map/Map.jsx @@ -61,13 +61,17 @@ export class ShowMap extends PureComponent { } render() { - const { height, superBlocks } = this.props; + const { superBlocks } = this.props; + let height = 'auto'; + if (!this.props.params) { + height = this.props.height + 'px'; + } return (
{ this.renderSuperBlocks(superBlocks) }