[Feat] @deck.gl/react: should a <deckLayer> nested in a <deckView> render only in that view?
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- data-visualization, frontend
Direzione di ricerca
This is a design discussion, not a scoped change: the issue explicitly says no change is planned and lists five open questions. Start by reading the @deck.gl/react renderer where the JSX tree is flattened into one layers list, plus the docs' layerFilter example, and compare with @deck.gl/react/legacy. Then read #9670 and the ViewLayout docs to see whether per-view layer lists could carry nested deckLayer elements; also inspect Deck._canvases and View.canvasId for how the generated filter composes with app filters. Done here means a decision on opt-in vs default, opt-out, nested-view ownership and filter precedence, not a patch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Moved from visgl/deck.gl-community#1036, now that the renderer is @deck.gl/react in deck.gl. Tracking: #10161.
Target Use Case
Should this render points only in the main view?
<DeckGL>
<deckView view={new MapView({id: 'main'})}>
<deckLayer layer={new ScatterplotLayer({id: 'points'})} />
</deckView>
<deckView view={new MapView({id: 'minimap', x: '75%', width: '25%', height: '25%'})}>
<deckLayer layer={new PathLayer({id: 'routes'})} />
</deckView>
</DeckGL>
The tree suggests it does. Today it doesn't: the renderer flattens the tree into one layers list, and deck.gl draws every layer in every view unless the app passes a layerFilter. The @deck.gl/react docs say so and show a layerFilter example. @deck.gl/react/legacy reads JSX layers only from the direct children of DeckGL.
Proposal
Open for discussion; no change is planned yet.
- The original fiber renderer once generated a
layerFilterfrom the tree. In the community issue, brandonjpierce noted it was kludgey and couldn't opt a layer out of filtering. - #9670 proposes per-view layer lists,
new View({layers})or aLayerGroupthat views reference. If core supports either, a nested<deckLayer>could map onto it directly instead of the renderer building alayerFilter. ViewLayoutalready compiles a declarative view tree. JSX layout elements could follow it, and view-scoped layers could extend that pattern.- Multi-canvas (
Deck._canvases,View.canvasId) scopes layers to a canvas's views with a generatedlayerFilter. A tree-based rule has to compose with that and with the app's ownlayerFilter.
Open questions:
- Opt-in (a root prop) or the default? A default changes what existing trees render.
- How does a layer opt out, so it renders in every view?
- With nested views, does a layer belong to its nearest view only?
- With a
layerFilterprop, AND the two, or let the app's filter win? - Should this wait for the view and layout work in #9670?
- Lingua principale
- TypeScript
- Stelle
- 14.8k
- Fork
- 2.3k
- Merge medio
- 1g 9h
- PR unite (30g)
- 230
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di visgl/deck.gl
-
[Bug] Tile3DLayer selects no tiles until the camera moves when tileset.json loads right after a layer updateForse già presa @lee3Q l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] SplitterWidget calls onDragStart on drag end; Deck._getViews writes into the app's views arrayForse già presa @04jennet-coder l’ha presa 20 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] WMSLayer positions EPSG:4326 images as CARTESIANForse già presa @athomct l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] MapLibreOverlay under React StrictMode: 'WebGL context already attached to device' because the attach path omits _reuseDevicesForse già presa @jsve l’ha presa 84 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
visgl/deck.gl#10681 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di visgl/deck.gl
Issue simili
-
accessibility area:ci ci-test level:low priority:high type:test
Difficoltà 2/5 1-3 ore Idoneità per principianti 71/100
skytuhua-org/Gen-V1#3132 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
drmrd/vernacular#1238 ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
enhancement migration-prioritized
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Hudson-Pufferfish/local-party-console#136 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno