Skip to content

Commit

Permalink
Added redux state
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap committed Mar 2, 2017
1 parent e2082dd commit 5df8b0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions web/client/components/data/query/QueryBuilder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const QueryBuilder = React.createClass({
resultTitle: React.PropTypes.string,
pagination: React.PropTypes.object,
sortOptions: React.PropTypes.object,
hits: React.PropTypes.bool
hits: React.PropTypes.bool,
maxHeight: React.PropTypes.number
},
getDefaultProps() {
return {
Expand All @@ -72,6 +73,7 @@ const QueryBuilder = React.createClass({
pagination: null,
sortOptions: null,
hits: false,
maxHeight: 830,
attributeFilterActions: {
onAddGroupField: () => {},
onAddFilterField: () => {},
Expand Down Expand Up @@ -137,7 +139,7 @@ const QueryBuilder = React.createClass({
sortOptions={this.props.sortOptions}
hits={this.props.hits}
/>
<div className="querypanel" style={{maxHeight: window.innerHeight - 170}}>
<div className="querypanel" style={{maxHeight: this.props.maxHeight - 170}}>
<GroupField
attributes={this.props.attributes}
groupLevels={this.props.groupLevels}
Expand Down
3 changes: 2 additions & 1 deletion web/client/plugins/TOC.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ const SmartQueryForm = connect((state) => {
ogcVersion: "1.1.0",
params: {typeName: state.query && state.query.typeName},
resultTitle: "Query Result",
showGeneratedFilter: false
showGeneratedFilter: false,
maxHeight: state.map && state.map.present && state.map.present.size && state.map.present.size.height
};
}, dispatch => {
return {
Expand Down

0 comments on commit 5df8b0e

Please sign in to comment.