MCPcopy Create free account
hub / github.com/microsoft/SandDance / configForSignalCapture

Method configForSignalCapture

docs/tests/v2/es6/js/sanddance.js:154639–154663  ·  view source on GitHub ↗
(presenterConfig)

Source from the content-addressed store, hash-verified

154637 }
154638
154639 configForSignalCapture(presenterConfig) {
154640 const colorContext = {
154641 colorMap: null,
154642 legend: null,
154643 legendElement: null
154644 }; //now be ready to capture color changing signals
154645
154646 presenterConfig.preStage = (stage, deckProps) => {
154647 if (this._shouldSaveColorContext()) {
154648 //save off the colors from Vega layout
154649 colorContext.colorMap = (0, _colorCubes.colorMapFromCubes)(stage.cubeData);
154650 }
154651
154652 this.preStage(stage, deckProps);
154653 };
154654
154655 presenterConfig.onPresent = () => {
154656 if (this._shouldSaveColorContext()) {
154657 (0, _colorCubes.populateColorContext)(colorContext, this.presenter);
154658 this.changeColorContexts([colorContext]);
154659
154660 this._dataScope.deselect();
154661 }
154662 };
154663 }
154664
154665 _render(insight, data, options) {
154666 return __awaiter(this, void 0, void 0, function* () {

Callers 1

renderNewLayoutMethod · 0.95

Calls 3

preStageMethod · 0.95
changeColorContextsMethod · 0.95
deselectMethod · 0.45

Tested by

no test coverage detected