This commit is contained in:
Gavin Nishizawa 2023-04-17 14:45:36 -07:00
parent 4bfbedac7d
commit 4b931f7aec
No known key found for this signature in database
GPG key ID: AE3B177777CE55CD
2 changed files with 1 additions and 1 deletions

View file

@ -209,7 +209,6 @@ func run(t *testing.T, tc testCase) {
renderOpts := &d2svg.RenderOpts{
Pad: 0,
ThemeID: tc.themeID,
// SetDimensions: true,
}
if len(diagram.Layers) > 0 || len(diagram.Scenarios) > 0 || len(diagram.Steps) > 0 {
masterID, err := diagram.HashID()

View file

@ -223,6 +223,7 @@ func (labelPosition Position) GetPointOnBox(box *geo.Box, padding, width, height
}
// return the top left point of a width x height label at the given label position on the route
// also return the index of the route segment that point is on
func (labelPosition Position) GetPointOnRoute(route geo.Route, strokeWidth, labelPercentage, width, height float64) (point *geo.Point, index int) {
totalLength := route.Length()
leftPosition := LEFT_LABEL_POSITION * totalLength