Commit 017bf2dd authored by jsimomaa's avatar jsimomaa Committed by Jani Simomaa

Diagram element calculateScaleRecip should never return 0

gitlab #78

Change-Id: Ie8a71822f7b0a8d2d8a0d9720a825fc8a59cf51f
(cherry picked from commit 6b176202)
parent b58c87bb
......@@ -49,6 +49,8 @@ public class DistrictNetworkNodeUtils {
public static double calculateScaleRecip(AffineTransform tr) {
int zoomLevel = MapScalingTransform.zoomLevel(tr);
if (zoomLevel == 0)
zoomLevel = 1;
return 1.0 / (getScale(tr) * Math.sqrt(zoomLevel));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment