mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-17 16:07:44 +03:00
Line bounds fix
This commit is contained in:
parent
dcadb01c4a
commit
abf9a5c8f7
@ -69,7 +69,13 @@ open class Shape: Node {
|
||||
bounds = rect
|
||||
} else if let roundRect = form as? RoundRect {
|
||||
bounds = roundRect.rect
|
||||
} else {
|
||||
} 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