Skip to content

Commit

Permalink
Merge pull request #4909 from camptocamp/GSGMF-924
Browse files Browse the repository at this point in the history
Only use the result window header to move the div
  • Loading branch information
fredj authored May 24, 2019
2 parents 4601435 + 63efc25 commit ad3e25a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
9 changes: 8 additions & 1 deletion contribs/gmf/src/query/window.less
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ div.ngeo-displaywindow {
flex-direction: column;
width: 100%;
height: 100%;
padding: @app-margin;
text-align: left;
white-space: nowrap;
overflow: hidden;
Expand All @@ -77,6 +76,14 @@ div.ngeo-displaywindow {
.content-template-container {
overflow: auto;
}
.header {
padding: @app-margin @app-margin 0 @app-margin;
}
.details {
padding: 0 @app-margin @app-margin @app-margin;
// small margin so that the scrollbar and the window resize are not in conflict.
margin-right: @half-app-margin;
}
}
}
.animation-container-detailed {
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/src/query/windowComponent.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
ng-animate-swap="ctrl.animate"
class="slide-animation gmf-animatable">

<div class="header">
<div class="header ui-draggable-handle">
<p
class="title"
>{{ctrl.source.label | translate}}</p>
Expand Down
13 changes: 7 additions & 6 deletions contribs/gmf/src/query/windowComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,15 @@ exports.Controller_.prototype.$onInit = function() {
}
highlightFeaturesOverlay.setStyle(highlightFeatureStyle);

const windowContainer = this.element_.find('.gmf-displayquerywindow .windowcontainer');
if (this.desktop) {
this.element_.find('.gmf-displayquerywindow .windowcontainer').draggable({
'cancel': 'input,textarea,button,select,option,tr',
'containment': this.draggableContainment
windowContainer.draggable({
handle: '.header',
containment: this.draggableContainment
});
this.element_.find('.gmf-displayquerywindow .windowcontainer').resizable({
'minHeight': 240,
'minWidth': 240
windowContainer.resizable({
minHeight: 240,
minWidth: 240
});
}
};
Expand Down

0 comments on commit ad3e25a

Please sign in to comment.