Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs action page import updates #2729

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ e.g. `updateVisDataUpdater` is the updater for `ActionTypes.UPDATE_VIS_DATA` (ta
Here is an example how you can listen to an app action `QUERY_SUCCESS` and call `updateVisDataUpdater` to load data into Kepler.Gl.

```js
import keplerGlReducer, {visStateUpdaters} from 'kepler.gl/reducers';
import {keplerGlReducer, visStateUpdaters} from '@kepler.gl/reducers';

// Root Reducer
const reducers = combineReducers({
Expand Down
26 changes: 13 additions & 13 deletions docs/api-reference/actions/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Returns an action dispatcher that wraps and forwards the actions to a specific i

```javascript
// action and forward dispatcher
import {toggleSplitMap, forwardTo} from 'kepler.gl/actions';
import {toggleSplitMap, forwardTo} from '@kepler.gl/actions';
import {connect} from 'react-redux';

const MapContainer = props => (
Expand Down Expand Up @@ -180,7 +180,7 @@ A forward action looks like this
**Examples**

```javascript
import {wrapTo, togglePerspective} from 'kepler.gl/actions';
import {wrapTo, togglePerspective} from '@kepler.gl/actions';

// This action will only dispatch to the KeplerGl instance with `id: map_1`
this.props.dispatch(wrapTo('map_1', togglePerspective()));
Expand All @@ -204,8 +204,8 @@ import {handleActions} from 'redux-actions';
import {createStore, combineReducers, applyMiddleware} from 'redux';
import {taskMiddleware} from 'react-palm/tasks';

import keplerGlReducer from 'kepler.gl/reducers';
import {ActionTypes} from 'kepler.gl/actions';
import keplerGlReducer from '@kepler.gl/reducers';
import {ActionTypes} from '@kepler.gl/actions';

const appReducer = handleActions(
{
Expand Down Expand Up @@ -383,7 +383,7 @@ to match the `info.id` of your dataset to the `dataId` in each `layer`, `filter`

```javascript
// app.js
import {addDataToMap} from 'kepler.gl/actions';
import {addDataToMap} from '@kepler.gl/actions';

const sampleTripData = {
fields: [
Expand Down Expand Up @@ -478,8 +478,8 @@ It will reset current configuration first then apply config to it.
**Examples**

```javascript
import {receiveMapConfig} from 'kepler.gl/actions';
import KeplerGlSchema from 'kepler.gl/schemas';
import {receiveMapConfig} from '@kepler.gl/actions';
import KeplerGlSchema from '@kepler.gl/schemas';

const parsedConfig = KeplerGlSchema.parseSavedConfig(config);
this.props.dispatch(receiveMapConfig(parsedConfig));
Expand Down Expand Up @@ -784,8 +784,8 @@ Set the map mode
**Examples**

```javascript
import {setMapMode} from 'kepler.gl/actions';
import {EDITOR_MODES} from 'kepler.gl/constants';
import {setMapMode} from '@kepler.gl/actions';
import {EDITOR_MODES} from '@kepler.gl/constants';

this.props.dispatch(setMapMode(EDITOR_MODES.DRAW_POLYGON));
```
Expand Down Expand Up @@ -1211,7 +1211,7 @@ Fit map viewport to bounds
**Examples**

```javascript
import {fitBounds} from 'kepler.gl/actions';
import {fitBounds} from '@kepler.gl/actions';
this.props.dispatch(fitBounds([-122.23, 37.127, -122.11, 37.456]));
```

Expand All @@ -1225,7 +1225,7 @@ Toggle between 3d and 2d map.
**Examples**

```javascript
import {togglePerspective} from 'kepler.gl/actions';
import {togglePerspective} from '@kepler.gl/actions';
this.props.dispatch(togglePerspective());
```

Expand All @@ -1243,7 +1243,7 @@ Toggle between single map or split maps
**Examples**

```javascript
import {toggleSplitMap} from 'kepler.gl/actions';
import {toggleSplitMap} from '@kepler.gl/actions';
this.props.dispatch(toggleSplitMap());
```

Expand All @@ -1269,7 +1269,7 @@ Update map viewport
**Examples**

```javascript
import {updateMap} from 'kepler.gl/actions';
import {updateMap} from '@kepler.gl/actions';
this.props.dispatch(
updateMap({latitude: 37.75043, longitude: -122.34679, width: 800, height: 1200})
);
Expand Down
Loading