Skip to content

Commit

Permalink
Fix #1497 Query panel shows a scrollbar when select spatial filter (#…
Browse files Browse the repository at this point in the history
…1509)

* Changed behavior of query panel scrollbar

* Added redux state
  • Loading branch information
allyoucanmap authored and offtherailz committed Mar 3, 2017
1 parent 4a28769 commit 10fe76d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 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">
<div className="querypanel" style={{maxHeight: this.props.maxHeight - 170}}>
<GroupField
attributes={this.props.attributes}
groupLevels={this.props.groupLevels}
Expand Down
3 changes: 1 addition & 2 deletions web/client/components/data/query/queryform.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@
/*border-bottom: 2px dotted #dedede;*/
overflow: hidden;
background-color: #ffffff;
margin-bottom: 20px;
}

#query-form-panel #query-toolbar-title {
Expand Down Expand Up @@ -272,10 +271,10 @@
}

.querypanel {
max-height: 660px;
overflow-x: hidden;
overflow-y: auto;
border: none;
padding-bottom: 150px;
}

/*****************************/
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 10fe76d

Please sign in to comment.