Exposes the stageEditableVis to fullEditor editors Fixes #10718 (#10720)

This commit is contained in:
Chris Cowan 2017-03-09 09:19:30 -08:00 committed by GitHub
parent 30bbf3a7de
commit 502843a34b
3 changed files with 4 additions and 8 deletions

View file

@ -76,6 +76,7 @@
saved-vis="savedVis"
editor="vis.type.params.editor"
ui-state="uiState"
stage-editable-vis="stageEditableVis"
class="vis-editor-full-options"></vis-editor-vis-options>
<div class="collapsible-sidebar" ng-if="!vis.type.fullEditor && chrome.getVisible()" >

View file

@ -13,7 +13,8 @@ uiModules
vis: '=',
savedVis: '=',
uiState: '=',
editor: '='
editor: '=',
stageEditableVis: '='
},
link: function ($scope, $el) {
const $optionContainer = $el.find('.visualization-options');

View file

@ -53,13 +53,7 @@ app.controller('MetricsEditorController', (
$scope.$watchCollection('model', (newValue, oldValue) => {
angular.copy(newValue, $scope.vis._editableVis.params);
// When the content of the model changes we need to stage the changes to
// the Editable visualization. Normally this is done through clicking the
// play which triggers `stageEditableVis` in kibana/public/visualize/editor/editor.js
// but because we are auto running everything that doesn't work with our worflow
// plus it's covered up by the Thor editor UI.
const visAppScope = angular.element($('visualize-app')).scope();
visAppScope.stageEditableVis();
$scope.stageEditableVis();
debouncedFetch();
const patternsToFetch = [];