fix small bug with magnifier display

This commit is contained in:
sonora 2013-10-29 01:13:06 +01:00
parent ab578a454c
commit 44d26dd308

View file

@ -207,13 +207,15 @@ public class MapControlsLayer extends OsmandMapLayer {
if (frac != 0) {
if (frac > 0) {
zoomText += "+";
} else {
zoomText += "-";
}
int ifrac = ((int) frac);
int ifrac = ((int) Math.abs(frac));
if (frac >= 1) {
zoomText += ifrac;
}
if (frac != ifrac) {
zoomText += "." + ((int) ((frac - ifrac) * 10f));
zoomText += "." + ((int) ((Math.abs(frac) - ifrac) * 10f));
}
}
float length = zoomTextPaint.measureText(zoomText);