MCPcopy
hub / github.com/microsoft/SandDance / configForSignalCapture

Method configForSignalCapture

packages/sanddance/src/viewer.ts:461–483  ·  view source on GitHub ↗
(presenterConfig: VegaDeckGl.types.PresenterConfig)

Source from the content-addressed store, hash-verified

459 }
460
461 private configForSignalCapture(presenterConfig: VegaDeckGl.types.PresenterConfig) {
462 const colorContext = {
463 colorMap: null,
464 legend: null,
465 legendElement: null,
466 };
467
468 //now be ready to capture color changing signals
469 presenterConfig.preStage = (stage: VegaDeckGl.types.Stage, deckProps: VegaDeckGl.DeckProps) => {
470 if (this._shouldSaveColorContext()) {
471 //save off the colors from Vega layout
472 colorContext.colorMap = colorMapFromCubes(stage.cubeData);
473 }
474 this.preStage(stage, deckProps);
475 };
476 presenterConfig.onPresent = () => {
477 if (this._shouldSaveColorContext()) {
478 populateColorContext(colorContext, this.presenter);
479 this.changeColorContexts([colorContext]);
480 this._dataScope.deselect();
481 }
482 };
483 }
484
485 private async _render(insight: Insight, data: object[], options: RenderOptions, forceNewCharacterSet: boolean) {
486 if (this._tooltip) {

Callers 1

renderNewLayoutMethod · 0.95

Calls 5

preStageMethod · 0.95
changeColorContextsMethod · 0.95
colorMapFromCubesFunction · 0.90
populateColorContextFunction · 0.90
deselectMethod · 0.45

Tested by

no test coverage detected