fix 3d hexagon bounding box
This commit is contained in:
parent
3ce0b1439e
commit
006a60d338
1 changed files with 5 additions and 1 deletions
|
|
@ -179,7 +179,11 @@ func (diagram Diagram) BoundingBox() (topLeft, bottomRight Point) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if targetShape.ThreeDee {
|
if targetShape.ThreeDee {
|
||||||
y1 = go2.Min(y1, targetShape.Pos.Y-THREE_DEE_OFFSET-targetShape.StrokeWidth)
|
offsetY := THREE_DEE_OFFSET
|
||||||
|
if targetShape.Type == ShapeHexagon {
|
||||||
|
offsetY /= 2
|
||||||
|
}
|
||||||
|
y1 = go2.Min(y1, targetShape.Pos.Y-offsetY-targetShape.StrokeWidth)
|
||||||
x2 = go2.Max(x2, targetShape.Pos.X+THREE_DEE_OFFSET+targetShape.Width+targetShape.StrokeWidth)
|
x2 = go2.Max(x2, targetShape.Pos.X+THREE_DEE_OFFSET+targetShape.Width+targetShape.StrokeWidth)
|
||||||
}
|
}
|
||||||
if targetShape.Multiple {
|
if targetShape.Multiple {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue