Fix linter complaint
This commit is contained in:
parent
66392f0612
commit
606dda3c14
1 changed files with 5 additions and 1 deletions
|
@ -289,7 +289,11 @@ class Hodograph():
|
||||||
cr.rectangle(offset + x, y + width * 1.5, width, width)
|
cr.rectangle(offset + x, y + width * 1.5, width, width)
|
||||||
cr.stroke()
|
cr.stroke()
|
||||||
|
|
||||||
text = "%dm" % (height) if height < 1000 else "%dkm" % (height /1000)
|
if height < 1000:
|
||||||
|
text = "%dm" % (height)
|
||||||
|
else:
|
||||||
|
text = "%dkm" % (int(height / 1000.0))
|
||||||
|
|
||||||
extents = cr.text_extents(text)
|
extents = cr.text_extents(text)
|
||||||
|
|
||||||
cr.move_to(offset + x - extents.width / 4, y + 3.5*width)
|
cr.move_to(offset + x - extents.width / 4, y + 3.5*width)
|
||||||
|
|
Loading…
Add table
Reference in a new issue