{"size": 2342, "ext": "js", "max_stars_repo_path": "app/containers/AdvancedRouteMapOptions.js", "max_stars_repo_name": "HSLdevcom/hsl-map-generator-ui", "max_stars_repo_stars_event_min_datetime": "2018-05-05T11:42:58.000Z", "max_stars_repo_stars_event_max_datetime": "2018-05-05T11:42:58.000Z", "max_issues_repo_path": "app/containers/AdvancedRouteMapOptions.js", "max_issues_repo_name": "HSLdevcom/hsl-map-generator-ui", "max_issues_repo_issues_event_min_datetime": "2020-09-03T23:10:39.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-22T17:14:02.000Z", "max_forks_repo_path": "app/containers/AdvancedRouteMapOptions.js", "max_forks_repo_name": "HSLdevcom/hsl-map-generator-ui", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 33.4571428571, "max_line_length": 78, "alphanum_fraction": 0.7058070026}
import {connect} from "react-redux";
import {bindActionCreators} from "redux";

import {
    setScaleFontSize,
    setScaleLength,
    setMaxAnchorLineLength,
    setClusterDifferentRoutePointsDistance,
    setClusterSameRoutePointsDistance,
    setPointMinDistanceFromTerminus,
    setIntermediatePointFontSize,
    setIntermediatePointMaxWidth,
    setTerminusFontSize,
    setTerminusMaxWidth,
    setStationNameFontSize
} from "../actions/routeMapConfiguration";
import AdvancedRouteMapOptions from "../components/AdvancedRouteMapOptions";

function mapStateToProps(state) {
    return {
        scaleFontSize: state.routeMapConfiguration.get("scaleFontSize"),
        scaleLength: state.routeMapConfiguration.get("scaleLength"),
        maxAnchorLineLength: state.routeMapConfiguration.get(
            "maxAnchorLineLength"
        ),
        clusterDifferentRoutePointsDistance: state.routeMapConfiguration.get(
            "clusterDifferentRoutePointsDistance"
        ),
        clusterSameRoutePointsDistance: state.routeMapConfiguration.get(
            "clusterSameRoutePointsDistance"
        ),
        pointMinDistanceFromTerminus: state.routeMapConfiguration.get(
            "pointMinDistanceFromTerminus"
        ),
        intermediatePointFontSize: state.routeMapConfiguration.get(
            "intermediatePointFontSize"
        ),
        intermediatePointWidth: state.routeMapConfiguration.get(
            "intermediatePointWidth"
        ),
        terminusFontSize: state.routeMapConfiguration.get("terminusFontSize"),
        terminusWidth: state.routeMapConfiguration.get("terminusWidth"),
        stationFontSize: state.routeMapConfiguration.get("stationFontSize")
    };
}

function mapDispatchToProps(dispatch) {
    return bindActionCreators(
        {
            setScaleFontSize,
            setScaleLength,
            setMaxAnchorLineLength,
            setClusterDifferentRoutePointsDistance,
            setClusterSameRoutePointsDistance,
            setPointMinDistanceFromTerminus,
            setIntermediatePointFontSize,
            setIntermediatePointMaxWidth,
            setTerminusFontSize,
            setTerminusMaxWidth,
            setStationNameFontSize
        },
        dispatch
    );
}

export default connect(
    mapStateToProps,
    mapDispatchToProps
)(AdvancedRouteMapOptions);
