Skip to content

Commit

Permalink
remove setting of vars
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Mar 13, 2018
1 parent c7f6691 commit ada0c89
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/core_plugins/tagcloud/public/tag_cloud_visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export class TagCloudVisualization {
constructor(node, vis) {
this._containerNode = node;


const cloudContainer = document.createElement('div');
cloudContainer.classList.add('tagcloud-vis');
this._containerNode.appendChild(cloudContainer);
Expand Down Expand Up @@ -60,16 +59,14 @@ export class TagCloudVisualization {

await this._renderComplete$.take(1).toPromise();

const truncatedMessage = this._containerNode.querySelector('.tagcloud-truncated-message');
const incompleteMessage = this._containerNode.querySelector('.tagcloud-incomplete-message');

const hasAggDefined = this._vis.aggs[0] && this._vis.aggs[1];
if (!hasAggDefined) {
incompleteMessage.style.display = 'none';
truncatedMessage.style.display = 'none';
this._feedbackMessage.setState({
shouldShowTruncate: false,
shouldShowIncomplete: false
});
return;
}

this._label.setState({
label: `${this._vis.aggs[0].makeLabel()} - ${this._vis.aggs[1].makeLabel()}`,
shouldShowLabel: this._vis.params.showLabel
Expand Down

0 comments on commit ada0c89

Please sign in to comment.