mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-19 08:57:35 +03:00
Line bounds fix
This commit is contained in:
parent
dcadb01c4a
commit
abf9a5c8f7
@ -69,6 +69,12 @@ open class Shape: Node {
|
||||
bounds = rect
|
||||
} else if let roundRect = form as? RoundRect {
|
||||
bounds = roundRect.rect
|
||||
} else if let line = form as? Line {
|
||||
bounds = Rect(
|
||||
x: min(line.x1, line.x2),
|
||||
y: min(line.y1, line.y2),
|
||||
w: abs(line.x1 - line.x2),
|
||||
h: abs(line.y1 - line.y2))
|
||||
} else {
|
||||
bounds = form.bounds()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user