From 08b5df3745b28cd081b55d22b9a21701d1524b16 Mon Sep 17 00:00:00 2001 From: Mirco Bertelli Date: Thu, 1 Oct 2015 10:55:03 +0200 Subject: [PATCH] positive min. and sec. in mouseposition, negative values have been showed for both min and sec. when unit is degreen. this fixes it. --- .../mapcontrols/mouseposition/MousePosition.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/client/components/mapcontrols/mouseposition/MousePosition.jsx b/web/client/components/mapcontrols/mouseposition/MousePosition.jsx index cef12a66f5..477e99b7ff 100644 --- a/web/client/components/mapcontrols/mouseposition/MousePosition.jsx +++ b/web/client/components/mapcontrols/mouseposition/MousePosition.jsx @@ -66,7 +66,14 @@ let MousePosition = React.createClass({ lngS = (lngM % 1) * 60; } } - return {lat, latM, latS, lng, lngM, lngS}; + return { + lat, + latM: Math.abs(latM), + latS: Math.abs(latS), + lng, + lngM: Math.abs(lngM), + lngS: Math.abs(lngS) + }; }, getTemplateComponent() { return (this.getUnits(this.props.mousePosition.crs) === "degrees") ? this.props.degreesTemplate : this.props.projectedTemplate;