From 7f521562f93beeb571eb1c0167d96c1db6eac232 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sun, 19 Sep 2021 16:36:22 +0300 Subject: [PATCH] Issue #84: fix simple connection width. --- map_machine/road.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/map_machine/road.py b/map_machine/road.py index 2ad8479..ea26cda 100644 --- a/map_machine/road.py +++ b/map_machine/road.py @@ -487,7 +487,7 @@ class Connector: index_1: int, road_2: Road, index_2: int, - flinger: Flinger, + _flinger: Flinger, scale: float, ) -> None: self.road_1: Road = road_1 @@ -497,6 +497,7 @@ class Connector: self.index_2: int = index_2 self.layer: float = min(road_1.layer, road_2.layer) + self.scale: float = scale def draw(self, svg: Drawing) -> None: """Draw connection fill.""" @@ -529,7 +530,7 @@ class SimpleConnector(Connector): """Draw connection fill.""" circle = svg.circle( self.point, - self.road_1.width + 1, + self.road_1.width * self.scale / 2, fill=self.road_1.matcher.color.hex, ) svg.add(circle) @@ -538,7 +539,7 @@ class SimpleConnector(Connector): """Draw connection outline.""" circle = svg.circle( self.point, - self.road_1.width + 2, + self.road_1.width * self.scale / 2 + 1, fill=self.road_1.matcher.border_color.hex, ) svg.add(circle)