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

Method canvasToDataURL

packages/vega-deck.gl/src/presenter.ts:327–335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325 }
326
327 public canvasToDataURL() {
328 return new Promise<string>((resolve, reject) => {
329 this._afterRenderHandler = () => {
330 this._afterRenderHandler = null;
331 const png = this.deckgl.canvas.toDataURL('image/png');
332 resolve(png);
333 };
334 });
335 }
336
337 /**
338 * Home the camera to the last initial position.

Callers 1

editSnapshotMethod · 0.45

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected