Kepler.gl: How to configure kepler so that the sider pane don't render on page?

Created on 7 Jul 2018  路  4Comments  路  Source: keplergl/kepler.gl

I am trying to integrate kepler into my application, I don't want to let the user configure data/filter by themselves, I want to know how to made the sider pane don't render, thanks in advance.

Most helpful comment

As an experimenting feature (aka, features that I haven't documented yet) keplerGlReducer allows you to customize its initialState. The property that controls the display of side panel is saved in state.uiState.readOnly.

all you need to do is to modify state.uiState.readOnly to true by passing a custom initialState when you import keplerGlReducer

const customizedKeplerGlReducer = keplerGlReducer.initialState({
   uiState: {readOnly: true}
});
// in your store
const reducers = combineReducers({
  keplerGl: customizedKeplerGlReducer,
  app: appReducer
});

And you also need to pass options: {readOnly: true} when you call addDataToMap

All 4 comments

As an experimenting feature (aka, features that I haven't documented yet) keplerGlReducer allows you to customize its initialState. The property that controls the display of side panel is saved in state.uiState.readOnly.

all you need to do is to modify state.uiState.readOnly to true by passing a custom initialState when you import keplerGlReducer

const customizedKeplerGlReducer = keplerGlReducer.initialState({
   uiState: {readOnly: true}
});
// in your store
const reducers = combineReducers({
  keplerGl: customizedKeplerGlReducer,
  app: appReducer
});

And you also need to pass options: {readOnly: true} when you call addDataToMap

@heshan0131 thank you so much, I set the state and it works, hope kepler could upgrade deck.gl soon, I am waiting for use kepler and deck.gl at same time.

@heshan0131 is there a way to have the panel just collapsed, but still available?

As an experimenting feature (aka, features that I haven't documented yet) keplerGlReducer allows you to customize its initialState. The property that controls the display of side panel is saved in state.uiState.readOnly.

all you need to do is to modify state.uiState.readOnly to true by passing a custom initialState when you import keplerGlReducer

const customizedKeplerGlReducer = keplerGlReducer.initialState({
   uiState: {readOnly: true}
});
// in your store
const reducers = combineReducers({
  keplerGl: customizedKeplerGlReducer,
  app: appReducer
});

And you also need to pass options: {readOnly: true} when you call addDataToMap

when trying to add this to the html code, is this meant to replace the next block:

          const reducers = (function createReducers(redux, keplerGl) {
            return redux.combineReducers({
              // mount keplerGl reducer
              keplerGl: keplerGl.keplerGlReducer
            });
          }(Redux, KeplerGl));

Or should it come after?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itch96 picture itch96  路  6Comments

pblack-trulia picture pblack-trulia  路  5Comments

ncthbrt picture ncthbrt  路  6Comments

stefan-- picture stefan--  路  3Comments

davidywang picture davidywang  路  5Comments