fix
This commit is contained in:
parent
5becfbfbe7
commit
589ba9f7f5
1 changed files with 7 additions and 4 deletions
|
|
@ -452,7 +452,8 @@ func (edge *Edge) TraceToShape(points []*geo.Point, startIndex, endIndex int) (n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if edge.Src.Icon != nil && !srcShape.Is(shape.IMAGE_TYPE) {
|
}
|
||||||
|
if !overlapsOutsideLabel && edge.Src.Icon != nil && !srcShape.Is(shape.IMAGE_TYPE) {
|
||||||
// assumes IconPosition is set if there is an Icon
|
// assumes IconPosition is set if there is an Icon
|
||||||
iconPosition := label.FromString(*edge.Src.IconPosition)
|
iconPosition := label.FromString(*edge.Src.IconPosition)
|
||||||
if iconPosition.IsOutside() {
|
if iconPosition.IsOutside() {
|
||||||
|
|
@ -538,12 +539,14 @@ func (edge *Edge) TraceToShape(points []*geo.Point, startIndex, endIndex int) (n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if edge.Dst.Icon != nil && !dstShape.Is(shape.IMAGE_TYPE) {
|
}
|
||||||
|
if !overlapsOutsideLabel && edge.Dst.Icon != nil && !dstShape.Is(shape.IMAGE_TYPE) {
|
||||||
// assumes IconPosition is set if there is an Icon
|
// assumes IconPosition is set if there is an Icon
|
||||||
iconPosition := label.FromString(*edge.Dst.IconPosition)
|
iconPosition := label.FromString(*edge.Dst.IconPosition)
|
||||||
if iconPosition.IsOutside() {
|
if iconPosition.IsOutside() {
|
||||||
iconWidth := float64(d2target.MAX_ICON_SIZE)
|
iconSize := d2target.GetIconSize(edge.Dst.Box, iconPosition.String())
|
||||||
iconHeight := float64(d2target.MAX_ICON_SIZE)
|
iconWidth := float64(iconSize)
|
||||||
|
iconHeight := float64(iconSize)
|
||||||
labelTL := iconPosition.GetPointOnBox(edge.Dst.Box, label.PADDING, iconWidth, iconHeight)
|
labelTL := iconPosition.GetPointOnBox(edge.Dst.Box, label.PADDING, iconWidth, iconHeight)
|
||||||
|
|
||||||
iconBox := geo.NewBox(labelTL, iconWidth, iconHeight)
|
iconBox := geo.NewBox(labelTL, iconWidth, iconHeight)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue