From 52c69c543bb33b0ef8b5f143413341be4c298738 Mon Sep 17 00:00:00 2001 From: Igor D Date: Sat, 23 Sep 2023 04:57:38 +0300 Subject: [PATCH] [feat] Add Deck onAfterRender callback prop support (#2332) --- src/components/src/map-container.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/src/map-container.tsx b/src/components/src/map-container.tsx index 87b1d24138..e40a6565a9 100644 --- a/src/components/src/map-container.tsx +++ b/src/components/src/map-container.tsx @@ -314,6 +314,7 @@ export interface MapContainerProps { deckRenderCallbacks?: { onDeckLoad?: () => void; onDeckRender?: (deckProps: Record) => Record | null; + onDeckAfterRender?: (deckProps: Record) => any; }; } @@ -838,6 +839,11 @@ export default function MapContainerFactory( } }} onWebGLInitialized={gl => this._onDeckInitialized(gl)} + onAfterRender={() => { + if (typeof deckRenderCallbacks?.onDeckAfterRender === 'function') { + deckRenderCallbacks.onDeckAfterRender(allDeckGlProps); + } + }} /> );