diff --git a/web/client/plugins/MousePosition.jsx b/web/client/plugins/MousePosition.jsx index ec7bcac7f8..cdfaf3f05e 100644 --- a/web/client/plugins/MousePosition.jsx +++ b/web/client/plugins/MousePosition.jsx @@ -14,6 +14,7 @@ const {Tooltip} = require('react-bootstrap'); const {createSelector} = require('reselect'); const assign = require('object-assign'); +const PropTypes = require('prop-types'); const {changeMousePositionCrs, changeMousePositionState} = require('../actions/mousePosition'); @@ -66,9 +67,26 @@ const MousePositionComponent = require('../components/mapcontrols/mouseposition/ class MousePosition extends React.Component { + static propTypes = { + degreesTemplate: PropTypes.string, + projectedTemplate: PropTypes.string + }; + + static defaultProps = { + degreesTemplate: 'MousePositionLabelDMS', + projectedTemplate: 'MousePositionLabelYX' + }; + + getTemplate = (template) => { + return require('../components/mapcontrols/mouseposition/' + template); + }; render() { + const { degreesTemplate, projectedTemplate, ...other} = this.props; return ( - } {...this.props}/> + } {...other}/> ); } }