Map overzoom: fix MapElement labelPosition processing #393

This commit is contained in:
Emux 2018-05-16 15:43:38 +03:00
parent 92937667d8
commit befa40e094
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3

View File

@ -111,6 +111,26 @@ public class MapElement extends GeometryBuffer {
return this;
}
@Override
public MapElement scale(float scaleX, float scaleY) {
super.scale(scaleX, scaleY);
if (labelPosition != null) {
labelPosition.x *= scaleX;
labelPosition.y *= scaleY;
}
return this;
}
@Override
public MapElement translate(float dx, float dy) {
super.translate(dx, dy);
if (labelPosition != null) {
labelPosition.x += dx;
labelPosition.y += dy;
}
return this;
}
@Override
public String toString() {
return tags.toString() + '\n' + super.toString() + '\n';