fix map header and scrolling (#11054)

Checked across browsers and platforms. Crossing fingers now :D haha
This commit is contained in:
Dylan
2016-10-06 15:06:18 -05:00
committed by Justin Richardsson
parent d662d2234a
commit 982ffd5228
2 changed files with 19 additions and 3 deletions

View File

@ -54,13 +54,25 @@
width: 100%; 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 { .drawer .map-fixed-header {
padding-top: 30px; padding-top: 30px;
position: static;
margin-bottom: -100px;
} }
.map-accordion { .map-accordion {
width: 100%; width: 100%;
margin-top: 100px;
max-width: 700px; max-width: 700px;
overflow-y: auto; overflow-y: auto;
@ -237,7 +249,7 @@
padding-left: 0; padding-left: 0;
} }
.map-accordion { .map-accordion {
top: 180px; top: 160px;
h2 { h2 {
margin: 15px 0; margin: 15px 0;
a { a {

View File

@ -61,13 +61,17 @@ export class ShowMap extends PureComponent {
} }
render() { render() {
const { height, superBlocks } = this.props; const { superBlocks } = this.props;
let height = 'auto';
if (!this.props.params) {
height = this.props.height + 'px';
}
return ( return (
<Col xs={ 12 }> <Col xs={ 12 }>
<MapHeader /> <MapHeader />
<div <div
className='map-accordion center-block' className='map-accordion center-block'
style={{ height: height + 'px' }} style={{ height: height }}
> >
{ this.renderSuperBlocks(superBlocks) } { this.renderSuperBlocks(superBlocks) }
<div className='spacer' /> <div className='spacer' />