Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alixander committed Sep 23, 2024
1 parent 5836dac commit ce44914
Show file tree
Hide file tree
Showing 6 changed files with 320 additions and 367 deletions.
24 changes: 0 additions & 24 deletions d2ir/d2ir.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package d2ir
import (
"errors"
"fmt"
"slices"
"strings"

"oss.terrastruct.com/util-go/go2"
Expand Down Expand Up @@ -228,29 +227,6 @@ func (m *Map) CopyBase(newParent Node) *Map {
return m2
}

func (m *Map) FindMap(ida []string) *Map {
if m == nil {
return (*Map)(nil)
}
curr := BoardIDA(m)
if slices.Equal(curr, ida) {
return m
}
for _, f := range m.Fields {
found := f.Map().FindMap(ida)
if found != nil {
return found
}
}
for _, e := range m.Edges {
found := e.Map().FindMap(ida)
if found != nil {
return found
}
}
return (*Map)(nil)
}

// Root reports whether the Map is the root of the D2 tree.
func (m *Map) Root() bool {
// m.parent exists even on the root map as we store the root AST in
Expand Down
152 changes: 76 additions & 76 deletions e2etests-cli/testdata/TestCLI_E2E/sequence-layer/index.exp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ce44914

Please sign in to comment.