Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (stage.backgroundColor) {
deckProps.style = { 'background-color': colorToString(stage.backgroundColor) };
}
this.deckgl = new classes.DeckGL_Class(deckProps);
}
let cubeCount = Math.max(this._last.cubeCount, stage.cubeData.length);
if (options.ordinalsSpecified) {
cubeCount = Math.max(cubeCount, options.maxOrdinal + 1);
const empty: Partial = {
isEmpty: true,
color: [0, 0, 0, 0] // possibly a bug in Deck.gl? set color to invisible.
};
stage.cubeData = patchCubeArray(cubeCount, empty, stage.cubeData as Cube[]);
}
this.setDeckProps(stage, height, width, cubeCount, config);
mount(LegendView({ legend: stage.legend, onClick: config && config.onLegendClick }), this.getElement(PresenterElement.legend));
if (config && config.onPresent) {
config.onPresent();
}
}
render() {
const hasRefinedData = this.dataScope.hasFilteredData();
const renderProps: RenderProps = {
language: this.language,
actionHandler: action => this.handleAction(action),
selectionHandler: (columnName, value) => this.selectByNameValue(columnName, value),
count: this.state.userSelection && this.state.userSelection.included.length,
hasRefinedData,
item: this.state.userSelection && this.state.userSelection.included[this.state.index],
remapColorHandler: remap => this.remapChanged(remap),
hasColorMaps: this.hasColorMaps() && hasRefinedData,
remapColor: this.state.remapColor
};
mount(renderDetails(renderProps), this.element);
}
}
private applyLegendColorContext(colorContext: ColorContext) {
mount(colorContext.legendElement, this.presenter.getElement(VegaDeckGl.PresenterElement.legend));
this.presenter.stage.legend = colorContext.legend;
}
export function initializePanel(presenter: IPresenter) {
const rootDiv = (
<div>
<div style="{{"></div>
<div>
<div></div>
<div></div>
</div>
</div>
);
mount(rootDiv, presenter.el);
}