generated from VLADIMIR/template
update editor
This commit is contained in:
@@ -47,6 +47,8 @@ type Graph struct {
|
||||
type Node struct {
|
||||
ID int32
|
||||
Label string
|
||||
Name string
|
||||
Text string
|
||||
}
|
||||
|
||||
type Edge struct {
|
||||
@@ -108,7 +110,14 @@ func (s *StoryService) GetGraph(ctx context.Context) *Graph {
|
||||
nodes := make([]*Node, 0, len(s.story.Places))
|
||||
for i, place := range s.story.Places {
|
||||
m[clearCode(place.Code)] = int32(i)
|
||||
nodes = append(nodes, &Node{ID: int32(i), Label: place.Code})
|
||||
nodes = append(
|
||||
nodes, &Node{
|
||||
ID: int32(i),
|
||||
Label: place.Code,
|
||||
Name: place.Name,
|
||||
Text: place.Text,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
edges := make([]*Edge, 0, len(s.story.Places)*3)
|
||||
|
||||
Reference in New Issue
Block a user