Skip to content

Commit

Permalink
Fix initial viewport when view is not MapView (#7896)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress authored May 17, 2023
1 parent 286519c commit b106327
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/core/src/lib/deck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,8 @@ export default class Deck {
// @ts-expect-error private assign to read-only property
this.height = newHeight;
this.viewManager?.setProps({width: newWidth, height: newHeight});
// Make sure that any new layer gets initialized with the current viewport
this.layerManager?.activateViewport(this.getViewports()[0]);
this.props.onResize({width: newWidth, height: newHeight});
}
}
Expand Down

0 comments on commit b106327

Please sign in to comment.