Hi, I’m running into a circular definition RuntimeError when I try to do the following in deck.gl. I’m trying to defind a new DeckGL instance and have a onViewStateChange
function update a property of this instance
deckgl = {
var zoomMode = 'X'
return new deck.DeckGL({
container,
views: new deck.OrthographicView(),
controller: {scrollZoom: true, inertia: true, zoomAxis: 'X'},
initialViewState: {target: [0, 0, 0], zoom: [0, 0]},
// circular definition
onViewStateChange: ({viewState}) => {
const nextZoomMode = viewState.zoom[0] > 3 ? 'all' : 'X'
if (zoomMode !== nextZoomMode) {
// update zoom mode
zoomMode = nextZoomMode
console.log(zoomMode)
// update Props
deckgl.setProps({
controller: {zoomAxis: zoomMode}
})
}
}
});
}
Here is a link to the notebook with the error and a Github page describing more background on the notebook.
Any help would be greatly appreciated