blob: 62dd7463d1cd1041932102b226cd0d557d02524a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import {connect} from "react-redux";
import {setMapDimensions, setMapPosition, setMapScale} from "../../actions/map";
import MapStageComponent from "../../components/map/MapStageComponent";
const mapStateToProps = state => {
return {
mapPosition: state.map.position,
mapDimensions: state.map.dimensions,
mapScale: state.map.scale,
};
};
const mapDispatchToProps = dispatch => {
return {
setMapPosition: (x, y) => dispatch(setMapPosition(x, y)),
setMapDimensions: (width, height) => dispatch(setMapDimensions(width, height)),
setMapScale: (scale) => dispatch(setMapScale(scale)),
};
};
const MapStage = connect(
mapStateToProps,
mapDispatchToProps
)(MapStageComponent);
export default MapStage;
|