* Instantiate a new Viewer. * @param element Parent HTMLElement to present within. * @param options Optional viewer options object.
(element, options)
| 9342 | * @param element Parent HTMLElement to present within. |
| 9343 | * @param options Optional viewer options object. |
| 9344 | */ constructor(element, options){ |
| 9345 | this.element = element; |
| 9346 | this.options = _vegaDeckGl.util.deepMerge((0, _defaults.defaultViewerOptions), options); |
| 9347 | this.presenter = new _vegaDeckGl.Presenter(element, (0, _defaults.getPresenterStyle)(this.options)); |
| 9348 | this._characterSet = new (0, _characterSet.CharacterSet)(); |
| 9349 | this._dataScope = new (0, _dataScope.DataScope)(); |
| 9350 | this._animator = new (0, _animator.Animator)(this._dataScope, { |
| 9351 | onDataChanged: this.onDataChanged.bind(this), |
| 9352 | onAnimateDataChange: this.onAnimateDataChange.bind(this) |
| 9353 | }); |
| 9354 | this._details = new (0, _details.Details)(this.presenter.getElement(_vegaDeckGl.PresenterElement.panel), this.options.language, this._animator, this._dataScope, (remap)=>{ |
| 9355 | this.currentColorContext = ~~remap; |
| 9356 | this.renderSameLayout(); |
| 9357 | }, ()=>this.insight && this.insight.columns && !!this.insight.columns.color && this.colorContexts && this.colorContexts.length > 1); |
| 9358 | this.insight = {}; |
| 9359 | } |
| 9360 | changeColorContexts(colorContexts) { |
| 9361 | this.colorContexts = colorContexts; |
| 9362 | this.currentColorContext = 0; |
nothing calls this directly
no test coverage detected