fixed right to left dependencies

This commit is contained in:
Louis Heredero 2024-03-23 23:59:53 +01:00
parent 9a032b1ebd
commit 7dc9d76d23

View File

@ -217,12 +217,19 @@ class Renderer:
self.drawStructure(valStruct, structures, dependStartX, descY) self.drawStructure(valStruct, structures, dependStartX, descY)
valueRight = dependStartX + dependWidth y = descY + bitH * 1.5
self.drawArrow(valueRight + arrowMargin,
descY + bitH*1.5, # Arrow from left to right
rStartX - arrowMargin, if dependRange.end > range_.start:
descY + bitH*1.5, x1 = dependStartX + dependWidth + arrowMargin
data["description"]) x2 = rStartX - arrowMargin
# Arrow from right to left
else:
x1 = dependStartX - arrowMargin
x2 = rStartX + rWidth + arrowMargin
self.drawArrow(x1, y, x2, y, data["description"])
self.drawArrow(rStartX + rWidth - bitW, self.drawArrow(rStartX + rWidth - bitW,
prevY, prevY,