Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

first vertical resizing 144

Benjamin King2e3dc58229e5
diff --git a/web/js/containers/modal.js b/web/js/containers/modal.js
index 8d09948b9..9c414ae13 100644
--- a/web/js/containers/modal.js
+++ b/web/js/containers/modal.js
@@ -38,7 +38,8 @@ class ModalContainer extends Component {
right: props.offsetRight,
top: props.offsetTop,
width: isResizable ? state.width : props.width,
- height: isResizable ? state.height : props.height
+ height: isResizable ? state.height : props.height,
+ maxHeight: isResizable ? state.height : props.height
};
}
@@ -54,16 +55,13 @@ class ModalContainer extends Component {
return bodyTemplate.isLoading ? (
<span> Loading </span>
) : (
- <div
- id="template-content"
- dangerouslySetInnerHTML={{ __html: bodyTemplate.response }}
- />
- );
+ <div
+ id="template-content"
+ dangerouslySetInnerHTML={{ __html: bodyTemplate.response }}
+ />
+ );
}
- setDimensions(updatedState) {
- this.setState(updatedState);
- }
render() {
const {
@@ -147,7 +145,7 @@ class ModalContainer extends Component {
fade={!isDraggable}
>
{CompletelyCustomModal
- ? (<CompletelyCustomModal key={'custom_' + lowerCaseId} setDimensions={this.setDimensions.bind(this)} height={this.state.height} width={this.state.width} {...customProps}
+ ? (<CompletelyCustomModal key={'custom_' + lowerCaseId} modalHeight={this.state.height} modalWidth={this.state.width} {...customProps}
toggleWithClose={toggleFunction} />)
: (
<DetectOuterClick
diff --git a/web/js/containers/vector-dialog.js b/web/js/containers/vector-dialog.js
index 8c68a4344..42337276c 100644
--- a/web/js/containers/vector-dialog.js
+++ b/web/js/containers/vector-dialog.js
@@ -19,7 +19,7 @@ class VectorDialog extends React.Component {
}
render() {
- const { toggleWithClose, vectorMetaObject, height } = this.props;
+ const { toggleWithClose, vectorMetaObject, modalHeight } = this.props;
const { activeIndex } = this.state;
const navArray = [];
const keyArray = [];
@@ -54,7 +54,7 @@ class VectorDialog extends React.Component {
</ ModalHeader>
<ModalBody>
- <Scrollbars style={{ maxHeight: height - 50 + 'px' }} name='thing'>
+ <Scrollbars style={{ maxHeight: modalHeight - 70 + 'px' }} >
<VectorMetaTable metaArray={activeMetaArray} title={keyArray[activeIndex]} />
</ Scrollbars>
</ModalBody>