Skip to content

Commit

Permalink
[chore] Docs action page import updates (#2729)
Browse files Browse the repository at this point in the history
* Update imports in api reference actions page and root readme
* Reverted the markdown href changes

Signed-off-by: Indranil Halder <[email protected]>
  • Loading branch information
indranildeveloper authored Nov 4, 2024
1 parent d783b43 commit e88577d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
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

0 comments on commit e88577d

Please sign in to comment.