Skip to content

Commit 83dea9e

Browse files
committed
wip
1 parent 03f814e commit 83dea9e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

cadastral.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,16 @@ def add_leg_labels(self, leg, orientation: str):
7878
angle_deg = math.degrees(angle_rad)
7979

8080
# Fractional positions
81-
first_x = leg.from_.easting + 0.2 * (leg.to.easting - leg.from_.easting)
82-
first_y = leg.from_.northing + 0.2 * (leg.to.northing - leg.from_.northing)
83-
last_x = leg.from_.easting + 0.8 * (leg.to.easting - leg.from_.easting)
84-
last_y = leg.from_.northing + 0.8 * (leg.to.northing - leg.from_.northing)
81+
first_x = leg.from_.easting + (0.2 * (leg.to.easting - leg.from_.easting))
82+
first_y = leg.from_.northing + (0.2 * (leg.to.northing - leg.from_.northing))
83+
last_x = leg.from_.easting + (0.8 * (leg.to.easting - leg.from_.easting))
84+
last_y = leg.from_.northing + (0.8 * (leg.to.northing - leg.from_.northing))
8585
mid_x = (leg.from_.easting + leg.to.easting) / 2
8686
mid_y = (leg.from_.northing + leg.to.northing) / 2
8787

8888
# Offset text above/below the line
8989
normals = line_normals((leg.from_.easting, leg.from_.northing), (leg.to.easting, leg.to.northing), orientation)
90-
offset_distance = 1 * self.get_drawing_scale()
90+
offset_distance = self.beacon_size * 0.2
9191
offset_inside_x = (normals[0][0] / math.hypot(*normals[0])) * offset_distance
9292
offset_inside_y = (normals[0][1] / math.hypot(*normals[0])) * offset_distance
9393
offset_outside_x = (normals[1][0] / math.hypot(*normals[1])) * offset_distance

0 commit comments

Comments
 (0)