Prevent rendering into 0 size containers (#16287) (#16294)

This commit is contained in:
Tim Roes 2018-01-29 10:30:51 +01:00 committed by GitHub
parent 6f87309395
commit 74f4f45875
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -27,8 +27,10 @@ export function VislibVisTypeProvider(Private) {
this.vis.refreshLegend = 0;
}
return new Promise((resolve, reject) => {
if (!this._response) return reject();
return new Promise((resolve) => {
if (this.el.clientWidth === 0 || this.el.clientHeight === 0) {
return resolve();
}
this.vis.vislibVis = new vislib.Vis(this.el, this.vis.params);
this.vis.vislibVis.on('brush', this.vis.API.events.brush);
this.vis.vislibVis.on('click', this.vis.API.events.filter);

View file

@ -17,7 +17,6 @@ uiModules
return {
restrict: 'E',
require: '?renderCounter',
scope: {
showSpyPanel: '=?',
vis: '=',