Skip to content

Commit

Permalink
Intentionally show spy pane in full screen mode, but not embed mode (e…
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon authored Aug 9, 2017
1 parent e8d1169 commit aedab18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ export class VisualizeEmbeddableHandler extends EmbeddableHandler {

visualizeScope.savedObj.vis.listeners.click = this.filterBarClickHandler(container.getAppState());
visualizeScope.savedObj.vis.listeners.brush = this.brushEvent(container.getAppState());
visualizeScope.isFullScreenMode = !chrome.getVisible();

// The chrome is permanently hidden in "embed mode" in which case we don't want to show the spy pane, since
// we deem that situation to be more public facing and want to hide more detailed information.
visualizeScope.getShouldShowSpyPane = () => !chrome.getIsChromePermanentlyHidden();

container.registerPanelIndexPattern(panel.panelIndex, visualizeScope.savedObj.vis.indexPattern);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<visualize
show-spy-panel="!isFullScreenMode"
show-spy-panel="getShouldShowSpyPane()"
saved-obj="savedObj"
app-state="appState"
ui-state="uiState"
Expand Down
4 changes: 4 additions & 0 deletions src/ui/public/chrome/api/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default function (chrome, internals) {
internals.visible = false;
};

chrome.getIsChromePermanentlyHidden = () => {
return permanentlyHideChrome;
};

/**
* @param {boolean} display - should the chrome be displayed
* @return {chrome}
Expand Down

0 comments on commit aedab18

Please sign in to comment.