Skip to content

Commit

Permalink
[feat] Add Deck onAfterRender callback prop support (#2332)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorDykhta committed Sep 23, 2023
1 parent 0b8ae8b commit 52c69c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/src/map-container.tsx
Expand Up @@ -314,6 +314,7 @@ export interface MapContainerProps {
deckRenderCallbacks?: {
onDeckLoad?: () => void;
onDeckRender?: (deckProps: Record<string, unknown>) => Record<string, unknown> | null;
onDeckAfterRender?: (deckProps: Record<string, unknown>) => any;
};
}

Expand Down Expand Up @@ -838,6 +839,11 @@ export default function MapContainerFactory(
}
}}
onWebGLInitialized={gl => this._onDeckInitialized(gl)}
onAfterRender={() => {
if (typeof deckRenderCallbacks?.onDeckAfterRender === 'function') {
deckRenderCallbacks.onDeckAfterRender(allDeckGlProps);
}
}}
/>
</div>
);
Expand Down

0 comments on commit 52c69c5

Please sign in to comment.