MCPcopy
hub / github.com/visgl/deck.gl / needsRedraw

Method needsRedraw

modules/core/src/lib/deck.ts:570–602  ·  view source on GitHub ↗

* Check if a redraw is needed * @returns `false` or a string summarizing the redraw reason

(
    opts: {
      /** Reset the redraw flag afterwards. Default `true` */
      clearRedrawFlags: boolean;
    } = {clearRedrawFlags: false}
  )

Source from the content-addressed store, hash-verified

568 * @returns `false` or a string summarizing the redraw reason
569 */
570 needsRedraw(
571 opts: {
572 /** Reset the redraw flag afterwards. Default `true` */
573 clearRedrawFlags: boolean;
574 } = {clearRedrawFlags: false}
575 ): false | string {
576 if (!this.layerManager) {
577 // Not initialized or already finalized
578 return false;
579 }
580 if (this.props._animate) {
581 return 'Deck._animate';
582 }
583
584 let redraw: false | string = this._needsRedraw;
585
586 if (opts.clearRedrawFlags) {
587 this._needsRedraw = false;
588 }
589
590 const viewManagerNeedsRedraw = this.viewManager!.needsRedraw(opts);
591 const layerManagerNeedsRedraw = this.layerManager.needsRedraw(opts);
592 const effectManagerNeedsRedraw = this.effectManager!.needsRedraw(opts);
593 const deckRendererNeedsRedraw = this.deckRenderer!.needsRedraw(opts);
594
595 redraw =
596 redraw ||
597 viewManagerNeedsRedraw ||
598 layerManagerNeedsRedraw ||
599 effectManagerNeedsRedraw ||
600 deckRendererNeedsRedraw;
601 return redraw;
602 }
603
604 /**
605 * Redraw the GL context

Callers 14

redrawMethod · 0.95
onMapMoveFunction · 0.45
_onDrawVectorMethod · 0.45
waitUntilReadyFunction · 0.45
waitUntilReadyFunction · 0.45
deck.spec.tsFile · 0.45
attribute.spec.tsFile · 0.45
idleMethod · 0.45
terrain.spec.tsFile · 0.45

Calls

no outgoing calls

Tested by 2

waitUntilReadyFunction · 0.36
waitUntilReadyFunction · 0.36