mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-23 22:16:25 +02:00
Issue #84: fix scale computing.
This commit is contained in:
parent
aa82353f00
commit
ef8e0a89e2
1 changed files with 3 additions and 0 deletions
|
@ -496,6 +496,9 @@ class Roads:
|
||||||
|
|
||||||
def draw(self, svg: Drawing, flinger: Flinger) -> None:
|
def draw(self, svg: Drawing, flinger: Flinger) -> None:
|
||||||
"""Draw whole road system."""
|
"""Draw whole road system."""
|
||||||
|
if not self.roads:
|
||||||
|
return
|
||||||
|
|
||||||
scale: float = flinger.get_scale(self.roads[0].nodes[0].coordinates)
|
scale: float = flinger.get_scale(self.roads[0].nodes[0].coordinates)
|
||||||
layered_roads: dict[float, list[Road]] = {}
|
layered_roads: dict[float, list[Road]] = {}
|
||||||
for road in self.roads:
|
for road in self.roads:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue