Skip to content

Commit b2ff874

Browse files
committed
adding implementsRenderComplete property to vis
1 parent ab94eef commit b2ff874

7 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/core_plugins/markdown_vis/public/markdown_vis.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ function MarkdownVisProvider(Private) {
2424
params: {
2525
editor: markdownVisParamsTemplate
2626
},
27-
requiresSearch: false
27+
requiresSearch: false,
28+
implementsRenderComplete: true,
2829
});
2930
}
3031

src/core_plugins/metric_vis/public/metric_vis.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function MetricVisProvider(Private) {
3131
},
3232
editor: metricVisParamsTemplate
3333
},
34+
implementsRenderComplete: true,
3435
schemas: new Schemas([
3536
{
3637
group: 'metrics',

src/core_plugins/table_vis/public/table_vis.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function TableVisTypeProvider(Private) {
4848
},
4949
editor: '<table-vis-params></table-vis-params>'
5050
},
51+
implementsRenderComplete: true,
5152
hierarchicalData: function (vis) {
5253
return Boolean(vis.params.showPartialRows || vis.params.showMeticsAtAllLevels);
5354
},

src/core_plugins/timelion/public/vis/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ define(function (require) {
2424
params: {
2525
editor: require('plugins/timelion/vis/timelion_vis_params.html')
2626
},
27-
requiresSearch: false
27+
requiresSearch: false,
28+
implementsRenderComplete: true,
2829
});
2930
}
3031

src/ui/public/vis/vis_type.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default function VisTypeFactory(Private) {
1515
this.schemas = opts.schemas || new VisTypeSchemas();
1616
this.params = opts.params || {};
1717
this.requiresSearch = opts.requiresSearch == null ? true : opts.requiresSearch; // Default to true unless otherwise specified
18+
this.implementsRenderComplete = false;
1819
}
1920

2021
VisType.prototype.createRenderbot = function (vis, $el, uiState) {

src/ui/public/vislib_vis_type/vislib_vis_type.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default function VislibVisTypeFactory(Private) {
2626
}
2727

2828
this.listeners = opts.listeners || {};
29+
this.implementsRenderComplete = true;
2930
}
3031

3132
VislibVisType.prototype.createRenderbot = function (vis, $el, uiState) {

src/ui/public/visualize/visualize.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ uiModules
145145

146146
if (oldVis) $scope.renderbot = null;
147147
if (vis) {
148-
vis.on('renderComplete', () => {
149-
$scope.$emit('renderComplete');
150-
});
151148
$scope.renderbot = vis.type.createRenderbot(vis, $visEl, $scope.uiState);
152149
}
153150
}));
@@ -169,7 +166,7 @@ uiModules
169166
}).catch(notify.fatal);
170167

171168
searchSource.onError(e => {
172-
$scope.$emit('renderComplete');
169+
$scope.vis.emit('renderComplete');
173170
if (isTermSizeZeroError(e)) {
174171
return notify.error(
175172
`Your visualization ('${$scope.vis.title}') has an error: it has a term ` +

0 commit comments

Comments
 (0)