1
1
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:
Viktor Sukochev 2017-02-02 18:20:08 +07:00
parent dcadb01c4a
commit abf9a5c8f7

View File

@ -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()
}