Skip to content

Commit

Permalink
Backport PR #8844: corrected spy fullscreen mode
Browse files Browse the repository at this point in the history
Ensures that expanding the spy panel takes up the full width/height of the container. 

Closes #8843.

---------

**Commit 1:**
corrected spy fullscreen mode

* Original sha: a092f15
* Authored by Stéphane Campinas <[email protected]> on 2016-10-26T09:22:58Z

**Commit 2:**
removed guard-clauses

* Original sha: 0403470
* Authored by Stéphane Campinas <[email protected]> on 2016-10-28T09:02:23Z
  • Loading branch information
elastic-jasper authored and thomasneirynck committed Oct 28, 2016
1 parent 236557b commit 2fdf95a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/ui/public/visualize/visualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ uiModules

let getVisEl = getter('.visualize-chart');
let getVisContainer = getter('.vis-container');
let getSpyContainer = getter('.visualize-spy-container');

// Show no results message when isZeroHits is true and it requires search
$scope.showNoResultsMessage = function () {
Expand All @@ -76,13 +77,16 @@ uiModules

let applyClassNames = function () {
let $visEl = getVisContainer();
const $spyEl = getSpyContainer();
let fullSpy = ($scope.spy.mode && ($scope.spy.mode.fill || $scope.fullScreenSpy));

$visEl.toggleClass('spy-only', Boolean(fullSpy));
$spyEl.toggleClass('only', Boolean(fullSpy));

$timeout(function () {
if (shouldHaveFullSpy()) {
$visEl.addClass('spy-only');
$spyEl.addClass('only');
};
}, 0);
};
Expand Down
4 changes: 2 additions & 2 deletions src/ui/public/visualize/visualize.less
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ visualize-spy {
margin-right: 5px;
}

&.only {
.visualize-spy-container {
.visualize-spy-container {
&.only {
height: auto;
}
}
Expand Down

0 comments on commit 2fdf95a

Please sign in to comment.