• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ehtick / deck.gl / 21614072501

02 Feb 2026 11:42PM UTC coverage: 91.09% (+0.001%) from 91.089%
21614072501

push

github

web-flow
feat(core): Add Deck#getView() method (#9948)

* feat(core): Add Deck#getView() method

Add a public `getView(viewId)` method to the Deck class that returns
a View by its id. This extracts the view lookup logic that was previously
duplicated in places like MapboxOverlay's deck-utils.

- Add `Deck#getView(viewId: string): View | undefined`
- Update `getViewport` in deck-utils to use the new API
- Add tests for single view and multiple views cases

Closes #9709

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(mapbox): Move isInitialized check to top of draw functions

This ensures getViewport is only called when deck is initialized,
which allows us to simplify getViewport by removing the redundant
isInitialized check. The fallback to getDefaultView remains for
safety but deck.getView() will now always find the configured view.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

6863 of 7542 branches covered (91.0%)

Branch coverage included in aggregate %.

14 of 16 new or added lines in 2 files covered. (87.5%)

56819 of 62369 relevant lines covered (91.1%)

14385.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.07
/modules/mapbox/src/deck-utils.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc