sovled bug that causes sometimes minus values in LocationPointerCompass

This commit is contained in:
Alexander Ries committed 2015-12-08 11:18:24 +01:00
1 parent 1fe88aad63
commit df7d6cef13
1 file changed
+2 -1
@@ -78,7 +78,8 @@ public class LocationPointerCompass extends AbsolutePanel implements HasWidgets,
compassNeedle.getElement().getStyle().setProperty("transform", "rotate(" + winddirectionformatted + "deg)");
compassNeedle.getElement().getStyle()
.setProperty("webkitTransform", "rotate(" + winddirectionformatted + "deg)");
angleToPointetLocationLabel.setText(winddirectionformatted + "°");
String winddirectionFormattedForLabel = NumberFormat.getFormat("#0").format((newDirection-angleOffset < 0) ? 360-newDirection-angleOffset : newDirection-angleOffset);
angleToPointetLocationLabel.setText(winddirectionFormattedForLabel+"°");
}
}