Skip to content

Commit 8ce19c5

Browse files
committed
remove unnecessary
1 parent 554106d commit 8ce19c5

File tree

68 files changed

+5538
-5571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5538
-5571
lines changed

d2graph/layout.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -436,21 +436,6 @@ func (edge *Edge) TraceToShape(points []*geo.Point, startIndex, endIndex int) (n
436436
startingSegment.End = points[startIndex+2]
437437
startIndex++
438438
}
439-
if intersections := labelBox.Intersections(startingSegment); len(intersections) > 0 {
440-
overlapsOutsideLabel = true
441-
p := intersections[0]
442-
if len(intersections) > 1 {
443-
p = findOuterIntersection(labelPosition, intersections)
444-
}
445-
// move starting segment to label intersection point
446-
points[startIndex] = p
447-
startingSegment.End = p
448-
// if the segment becomes too short, just merge it with the next segment
449-
if startIndex+1 < endIndex && startingSegment.Length() < MIN_SEGMENT_LEN {
450-
points[startIndex+1] = points[startIndex]
451-
startIndex++
452-
}
453-
}
454439
}
455440
}
456441
if !overlapsOutsideLabel {

d2layouts/d2elklayout/layout.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,11 +1116,6 @@ func adjustDimensions(obj *d2graph.Object) (width, height float64) {
11161116
width = go2.Max(width, float64(obj.LabelDimensions.Width))
11171117
}
11181118
}
1119-
1120-
// special handling
1121-
if obj.HasOutsideBottomLabel() || obj.Icon != nil {
1122-
height += float64(obj.LabelDimensions.Height) + label.PADDING
1123-
}
11241119
}
11251120

11261121
if obj.Icon != nil && obj.Shape.Value != d2target.ShapeImage {
@@ -1189,11 +1184,6 @@ func cleanupAdjustment(obj *d2graph.Object) {
11891184
}
11901185
}
11911186

1192-
// special handling to start/end connections below label
1193-
if obj.HasOutsideBottomLabel() {
1194-
obj.Height -= float64(obj.LabelDimensions.Height) + label.PADDING
1195-
}
1196-
11971187
// remove the extra width/height we added for 3d/multiple after all objects/connections are placed
11981188
// and shift the shapes down accordingly
11991189
dx, dy := obj.GetModifierElementAdjustments()

d2renderers/d2sketch/testdata/twitter/sketch.exp.svg

Lines changed: 284 additions & 284 deletions
Loading

d2renderers/d2sketch/testdata/twitter_dark/sketch.exp.svg

Lines changed: 284 additions & 284 deletions
Loading

d2renderers/d2svg/dark_theme/testdata/twitter/dark_theme.exp.svg

Lines changed: 284 additions & 284 deletions
Loading
0 Bytes
Binary file not shown.

e2etests/testdata/regression/dagre_disconnected_edge/elk/board.exp.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2etests/testdata/regression/dagre_disconnected_edge/elk/sketch.exp.svg

Lines changed: 78 additions & 78 deletions
Loading

e2etests/testdata/regression/elk_img_empty_label_panic/elk/board.exp.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 74 additions & 74 deletions
Loading

0 commit comments

Comments
 (0)