Handle layout with binaries

This commit is contained in:
Júlio César Batista 2022-12-01 18:08:34 -08:00
parent b2ec5970e5
commit 8621512739
No known key found for this signature in database
GPG key ID: 10C4B861BF314878
12 changed files with 1428 additions and 1412 deletions

View file

@ -17,34 +17,29 @@ import (
// Once all nodes were processed, it continues to run the layout engine without the sequence diagram nodes and edges. // Once all nodes were processed, it continues to run the layout engine without the sequence diagram nodes and edges.
// Then it restores all objects with their proper layout engine and sequence diagram positions // Then it restores all objects with their proper layout engine and sequence diagram positions
func Layout(ctx context.Context, g *d2graph.Graph, layout func(ctx context.Context, g *d2graph.Graph) error) error { func Layout(ctx context.Context, g *d2graph.Graph, layout func(ctx context.Context, g *d2graph.Graph) error) error {
// keeps the current graph state
oldObjects := g.Objects
oldEdges := g.Edges
// flag objects to keep to avoid having to flag all descendants of sequence diagram to be removed // flag objects to keep to avoid having to flag all descendants of sequence diagram to be removed
objectsToKeep := make(map[*d2graph.Object]struct{}) objectsToKeep := make(map[*d2graph.Object]struct{})
// edges flagged to be removed (these are internal edges of the sequence diagrams) // edges flagged to be removed (these are internal edges of the sequence diagrams)
edgesToRemove := make(map[*d2graph.Edge]struct{}) edgesToRemove := make(map[*d2graph.Edge]struct{})
// store the sequence diagram related to a given node // store the sequence diagram related to a given node
sequenceDiagrams := make(map[*d2graph.Object]*sequenceDiagram) sequenceDiagrams := make(map[string]*sequenceDiagram)
// keeps the reference of the children of a given node // keeps the reference of the children of a given node
objChildrenArray := make(map[*d2graph.Object][]*d2graph.Object) childrenReplacement := make(map[string][]*d2graph.Object)
// goes from root and travers all descendants // goes from root and travers all descendants
queue := make([]*d2graph.Object, 1, len(oldObjects)) queue := make([]*d2graph.Object, 1, len(g.Objects))
queue[0] = g.Root queue[0] = g.Root
for len(queue) > 0 { for len(queue) > 0 {
obj := queue[0] obj := queue[0]
queue = queue[1:] queue = queue[1:]
// root is not part of g.Objects, so we can't add it here
objectsToKeep[obj] = struct{}{} objectsToKeep[obj] = struct{}{}
if obj.Attributes.Shape.Value == d2target.ShapeSequenceDiagram { if obj.Attributes.Shape.Value == d2target.ShapeSequenceDiagram {
// TODO: should update obj.References too? // TODO: should update obj.References too?
// clean current children and keep a backup to restore them later // clean current children and keep a backup to restore them later
obj.Children = make(map[string]*d2graph.Object) obj.Children = make(map[string]*d2graph.Object)
objChildrenArray[obj] = obj.ChildrenArray children := obj.ChildrenArray
obj.ChildrenArray = nil obj.ChildrenArray = nil
// creates a mock rectangle so that layout considers this size // creates a mock rectangle so that layout considers this size
sdMock := obj.EnsureChild([]string{"sequence_diagram"}) sdMock := obj.EnsureChild([]string{"sequence_diagram"})
@ -62,36 +57,47 @@ func Layout(ctx context.Context, g *d2graph.Graph, layout func(ctx context.Conte
} }
} }
sd := newSequenceDiagram(objChildrenArray[obj], edges) sd := newSequenceDiagram(children, edges)
sd.layout() sd.layout()
sdMock.Box = geo.NewBox(nil, sd.getWidth(), sd.getHeight()) sdMock.Box = geo.NewBox(nil, sd.getWidth(), sd.getHeight())
sequenceDiagrams[obj] = sd sequenceDiagrams[sdMock.AbsID()] = sd
childrenReplacement[sdMock.AbsID()] = children
} else { } else {
// only move to children if the parent is not a sequence diagram // only move to children if the parent is not a sequence diagram
queue = append(queue, obj.ChildrenArray...) queue = append(queue, obj.ChildrenArray...)
} }
} }
if len(sequenceDiagrams) == 0 {
return layout(ctx, g)
}
// removes the edges // removes the edges
newEdges := make([]*d2graph.Edge, 0, len(g.Edges)-len(edgesToRemove)) layoutEdges := make([]*d2graph.Edge, 0, len(g.Edges)-len(edgesToRemove))
sequenceDiagramEdges := make([]*d2graph.Edge, 0, len(edgesToRemove))
for _, edge := range g.Edges { for _, edge := range g.Edges {
if _, exists := edgesToRemove[edge]; !exists { if _, exists := edgesToRemove[edge]; !exists {
newEdges = append(newEdges, edge) layoutEdges = append(layoutEdges, edge)
} else {
sequenceDiagramEdges = append(sequenceDiagramEdges, edge)
} }
} }
g.Edges = layoutEdges
// done this way (by flagging objects) instead of appending to `queue` // done this way (by flagging objects) instead of appending to `queue`
// because appending in that order would change the order of g.Objects which // because appending in that order would change the order of g.Objects which
// could lead to layout changes (as the order of the objects might be important for the underlying engine) // could lead to layout changes (as the order of the objects might be important for the underlying engine)
newObjects := make([]*d2graph.Object, 0, len(objectsToKeep)) layoutObjects := make([]*d2graph.Object, 0, len(objectsToKeep))
sequenceDiagramObjects := make([]*d2graph.Object, 0, len(g.Objects)-len(objectsToKeep))
for _, obj := range g.Objects { for _, obj := range g.Objects {
if _, exists := objectsToKeep[obj]; exists { if _, exists := objectsToKeep[obj]; exists {
newObjects = append(newObjects, obj) layoutObjects = append(layoutObjects, obj)
} else {
sequenceDiagramObjects = append(sequenceDiagramObjects, obj)
} }
} }
g.Objects = layoutObjects
g.Objects = newObjects
g.Edges = newEdges
if g.Root.Attributes.Shape.Value == d2target.ShapeSequenceDiagram { if g.Root.Attributes.Shape.Value == d2target.ShapeSequenceDiagram {
// don't need to run the layout engine if the root is a sequence diagram // don't need to run the layout engine if the root is a sequence diagram
g.Root.ChildrenArray[0].TopLeft = geo.NewPoint(0, 0) g.Root.ChildrenArray[0].TopLeft = geo.NewPoint(0, 0)
@ -99,25 +105,36 @@ func Layout(ctx context.Context, g *d2graph.Graph, layout func(ctx context.Conte
return err return err
} }
// restores objects & edges g.Edges = append(g.Edges, sequenceDiagramEdges...)
g.Edges = oldEdges
g.Objects = oldObjects // restores objects
// it must be this way because the objects pointer reference is lost when calling layout engines compiled in binaries
allObjects := sequenceDiagramObjects
for _, obj := range g.Objects {
if _, exists := sequenceDiagrams[obj.AbsID()]; !exists {
allObjects = append(allObjects, obj)
continue
}
// we don't want `sdMock` in `g.Objects` because they shouldn't be rendered
// just to make it easier to read
sdMock := obj
parent := obj.Parent
for obj, children := range objChildrenArray {
// shift the sequence diagrams as they are always placed at (0, 0) // shift the sequence diagrams as they are always placed at (0, 0)
sdMock := obj.ChildrenArray[0] sequenceDiagrams[sdMock.AbsID()].shift(sdMock.TopLeft)
sequenceDiagrams[obj].shift(sdMock.TopLeft)
// restore children // restore children
obj.Children = make(map[string]*d2graph.Object) parent.Children = make(map[string]*d2graph.Object)
for _, child := range children { for _, child := range childrenReplacement[sdMock.AbsID()] {
obj.Children[child.ID] = child parent.Children[child.ID] = child
} }
obj.ChildrenArray = children parent.ChildrenArray = childrenReplacement[sdMock.AbsID()]
// add lifeline edges // add lifeline edges
g.Edges = append(g.Edges, sequenceDiagrams[obj].lifelines...) g.Edges = append(g.Edges, sequenceDiagrams[sdMock.AbsID()].lifelines...)
} }
g.Objects = allObjects
return nil return nil
} }

View file

@ -1046,7 +1046,6 @@ size XXXL -> custom 64: custom 48 {
}, { }, {
name: "sequence_diagram_simple", name: "sequence_diagram_simple",
script: `shape: sequence_diagram script: `shape: sequence_diagram
alice: "Alice\nline\nbreaker" { alice: "Alice\nline\nbreaker" {
shape: person shape: person
style.stroke: red style.stroke: red

View file

@ -5,8 +5,8 @@
"id": "scorer", "id": "scorer",
"type": "", "type": "",
"pos": { "pos": {
"x": 12, "x": 0,
"y": 62 "y": 50
}, },
"width": 179, "width": 179,
"height": 141, "height": 141,
@ -44,8 +44,8 @@
"id": "scorer.abc", "id": "scorer.abc",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 91, "x": 79,
"y": 1248 "y": 1236
}, },
"width": 20, "width": 20,
"height": 50, "height": 50,
@ -82,8 +82,8 @@
"id": "itemResponse", "id": "itemResponse",
"type": "", "type": "",
"pos": { "pos": {
"x": 391, "x": 379,
"y": 62 "y": 50
}, },
"width": 270, "width": 270,
"height": 141, "height": 141,
@ -121,8 +121,8 @@
"id": "itemResponse.a", "id": "itemResponse.a",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 516, "x": 504,
"y": 348 "y": 336
}, },
"width": 20, "width": 20,
"height": 160, "height": 160,
@ -159,8 +159,8 @@
"id": "item", "id": "item",
"type": "", "type": "",
"pos": { "pos": {
"x": 861, "x": 849,
"y": 62 "y": 50
}, },
"width": 157, "width": 157,
"height": 141, "height": 141,
@ -198,8 +198,8 @@
"id": "item.a", "id": "item.a",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 929, "x": 917,
"y": 488 "y": 476
}, },
"width": 20, "width": 20,
"height": 770, "height": 770,
@ -236,8 +236,8 @@
"id": "item.a.b", "id": "item.a.b",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 924, "x": 912,
"y": 498 "y": 486
}, },
"width": 30, "width": 30,
"height": 160, "height": 160,
@ -274,8 +274,8 @@
"id": "essayRubric", "id": "essayRubric",
"type": "", "type": "",
"pos": { "pos": {
"x": 1218, "x": 1206,
"y": 62 "y": 50
}, },
"width": 245, "width": 245,
"height": 141, "height": 141,
@ -313,8 +313,8 @@
"id": "essayRubric.a", "id": "essayRubric.a",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1330, "x": 1318,
"y": 628 "y": 616
}, },
"width": 20, "width": 20,
"height": 340, "height": 340,
@ -351,8 +351,8 @@
"id": "essayRubric.a.b", "id": "essayRubric.a.b",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1325, "x": 1313,
"y": 638 "y": 626
}, },
"width": 30, "width": 30,
"height": 320, "height": 320,
@ -389,8 +389,8 @@
"id": "essayRubric.a.b.c", "id": "essayRubric.a.b.c",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1320, "x": 1308,
"y": 648 "y": 636
}, },
"width": 40, "width": 40,
"height": 160, "height": 160,
@ -427,8 +427,8 @@
"id": "concept", "id": "concept",
"type": "", "type": "",
"pos": { "pos": {
"x": 1663, "x": 1651,
"y": 62 "y": 50
}, },
"width": 200, "width": 200,
"height": 141, "height": 141,
@ -466,8 +466,8 @@
"id": "concept.a", "id": "concept.a",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1753, "x": 1741,
"y": 768 "y": 756
}, },
"width": 20, "width": 20,
"height": 370, "height": 370,
@ -504,8 +504,8 @@
"id": "concept.a.b", "id": "concept.a.b",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1748, "x": 1736,
"y": 778 "y": 766
}, },
"width": 30, "width": 30,
"height": 350, "height": 350,
@ -542,8 +542,8 @@
"id": "concept.a.b.c", "id": "concept.a.b.c",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1743, "x": 1731,
"y": 788 "y": 776
}, },
"width": 40, "width": 40,
"height": 330, "height": 330,
@ -580,8 +580,8 @@
"id": "concept.a.b.c.d", "id": "concept.a.b.c.d",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1738, "x": 1726,
"y": 798 "y": 786
}, },
"width": 50, "width": 50,
"height": 310, "height": 310,
@ -618,8 +618,8 @@
"id": "itemOutcome", "id": "itemOutcome",
"type": "", "type": "",
"pos": { "pos": {
"x": 2063, "x": 2051,
"y": 62 "y": 50
}, },
"width": 265, "width": 265,
"height": 141, "height": 141,
@ -657,8 +657,8 @@
"id": "itemOutcome.a", "id": "itemOutcome.a",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 2185, "x": 2173,
"y": 1058 "y": 1046
}, },
"width": 20, "width": 20,
"height": 390, "height": 390,
@ -695,8 +695,8 @@
"id": "itemOutcome.a.b", "id": "itemOutcome.a.b",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 2180, "x": 2168,
"y": 1068 "y": 1056
}, },
"width": 30, "width": 30,
"height": 370, "height": 370,
@ -733,8 +733,8 @@
"id": "itemOutcome.a.b.c", "id": "itemOutcome.a.b.c",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 2175, "x": 2163,
"y": 1078 "y": 1066
}, },
"width": 40, "width": 40,
"height": 350, "height": 350,
@ -771,8 +771,8 @@
"id": "itemOutcome.a.b.c.d", "id": "itemOutcome.a.b.c.d",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 2170, "x": 2158,
"y": 1088 "y": 1076
}, },
"width": 50, "width": 50,
"height": 330, "height": 330,
@ -809,8 +809,8 @@
"id": "itemOutcome.a.b.c.d.e", "id": "itemOutcome.a.b.c.d.e",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 2165, "x": 2153,
"y": 1098 "y": 1086
}, },
"width": 60, "width": 60,
"height": 310, "height": 310,
@ -847,8 +847,8 @@
"id": "itemResponse.c", "id": "itemResponse.c",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 516, "x": 504,
"y": 1548 "y": 1536
}, },
"width": 20, "width": 20,
"height": 50, "height": 50,
@ -909,12 +909,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 106.5, "x": 94.5,
"y": 353 "y": 341
}, },
{ {
"x": 511, "x": 499,
"y": 353 "y": 341
} }
], ],
"animated": false, "animated": false,
@ -948,12 +948,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 541, "x": 529,
"y": 503 "y": 491
}, },
{ {
"x": 919.5, "x": 907.5,
"y": 503 "y": 491
} }
], ],
"animated": false, "animated": false,
@ -987,12 +987,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 959.5, "x": 947.5,
"y": 653 "y": 641
}, },
{ {
"x": 1315.5, "x": 1303.5,
"y": 653 "y": 641
} }
], ],
"animated": false, "animated": false,
@ -1026,12 +1026,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1365.5, "x": 1353.5,
"y": 803 "y": 791
}, },
{ {
"x": 1733, "x": 1721,
"y": 803 "y": 791
} }
], ],
"animated": false, "animated": false,
@ -1065,12 +1065,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 954.5, "x": 942.5,
"y": 953 "y": 941
}, },
{ {
"x": 1320.5, "x": 1308.5,
"y": 953 "y": 941
} }
], ],
"animated": false, "animated": false,
@ -1104,12 +1104,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1793, "x": 1781,
"y": 1103 "y": 1091
}, },
{ {
"x": 2160.5, "x": 2148.5,
"y": 1103 "y": 1091
} }
], ],
"animated": false, "animated": false,
@ -1143,12 +1143,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 1253 "y": 1241
}, },
{ {
"x": 924.5, "x": 912.5,
"y": 1253 "y": 1241
} }
], ],
"animated": false, "animated": false,
@ -1182,12 +1182,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 2160.5, "x": 2148.5,
"y": 1403 "y": 1391
}, },
{ {
"x": 106.5, "x": 94.5,
"y": 1403 "y": 1391
} }
], ],
"animated": false, "animated": false,
@ -1221,12 +1221,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 106.5, "x": 94.5,
"y": 1553 "y": 1541
}, },
{ {
"x": 511, "x": 499,
"y": 1553 "y": 1541
} }
], ],
"animated": false, "animated": false,
@ -1260,12 +1260,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 101.5, "x": 89.5,
"y": 203 "y": 191
}, },
{ {
"x": 101.5, "x": 89.5,
"y": 1703 "y": 1691
} }
], ],
"animated": false, "animated": false,
@ -1299,12 +1299,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 526, "x": 514,
"y": 203 "y": 191
}, },
{ {
"x": 526, "x": 514,
"y": 1703 "y": 1691
} }
], ],
"animated": false, "animated": false,
@ -1338,12 +1338,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 939.5, "x": 927.5,
"y": 203 "y": 191
}, },
{ {
"x": 939.5, "x": 927.5,
"y": 1703 "y": 1691
} }
], ],
"animated": false, "animated": false,
@ -1377,12 +1377,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1340.5, "x": 1328.5,
"y": 203 "y": 191
}, },
{ {
"x": 1340.5, "x": 1328.5,
"y": 1703 "y": 1691
} }
], ],
"animated": false, "animated": false,
@ -1416,12 +1416,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1763, "x": 1751,
"y": 203 "y": 191
}, },
{ {
"x": 1763, "x": 1751,
"y": 1703 "y": 1691
} }
], ],
"animated": false, "animated": false,
@ -1455,12 +1455,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 2195.5, "x": 2183.5,
"y": 203 "y": 191
}, },
{ {
"x": 2195.5, "x": 2183.5,
"y": 1703 "y": 1691
} }
], ],
"animated": false, "animated": false,

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 332 KiB

After

Width:  |  Height:  |  Size: 332 KiB

View file

@ -5,8 +5,8 @@
"id": "alice", "id": "alice",
"type": "person", "type": "person",
"pos": { "pos": {
"x": 12, "x": 0,
"y": 142 "y": 130
}, },
"width": 163, "width": 163,
"height": 158, "height": 158,
@ -44,8 +44,8 @@
"id": "bob", "id": "bob",
"type": "person", "type": "person",
"pos": { "pos": {
"x": 492, "x": 480,
"y": 174 "y": 162
}, },
"width": 132, "width": 132,
"height": 126, "height": 126,
@ -83,8 +83,8 @@
"id": "db", "id": "db",
"type": "cylinder", "type": "cylinder",
"pos": { "pos": {
"x": 941, "x": 929,
"y": 174 "y": 162
}, },
"width": 124, "width": 124,
"height": 126, "height": 126,
@ -122,8 +122,8 @@
"id": "queue", "id": "queue",
"type": "queue", "type": "queue",
"pos": { "pos": {
"x": 1382, "x": 1370,
"y": 174 "y": 162
}, },
"width": 149, "width": 149,
"height": 126, "height": 126,
@ -161,8 +161,8 @@
"id": "service", "id": "service",
"type": "", "type": "",
"pos": { "pos": {
"x": 1848, "x": 1836,
"y": 62 "y": 50
}, },
"width": 202, "width": 202,
"height": 238, "height": 238,
@ -224,12 +224,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 98.5, "x": 86.5,
"y": 450 "y": 438
}, },
{ {
"x": 553, "x": 541,
"y": 450 "y": 438
} }
], ],
"animated": false, "animated": false,
@ -263,12 +263,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 563, "x": 551,
"y": 600 "y": 588
}, },
{ {
"x": 1944, "x": 1932,
"y": 600 "y": 588
} }
], ],
"animated": false, "animated": false,
@ -302,12 +302,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1944, "x": 1932,
"y": 750 "y": 738
}, },
{ {
"x": 1008, "x": 996,
"y": 750 "y": 738
} }
], ],
"animated": false, "animated": false,
@ -341,12 +341,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1008, "x": 996,
"y": 900 "y": 888
}, },
{ {
"x": 1944, "x": 1932,
"y": 900 "y": 888
} }
], ],
"animated": false, "animated": false,
@ -380,12 +380,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1944, "x": 1932,
"y": 1050 "y": 1038
}, },
{ {
"x": 563, "x": 551,
"y": 1050 "y": 1038
} }
], ],
"animated": false, "animated": false,
@ -419,12 +419,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 553, "x": 541,
"y": 1200 "y": 1188
}, },
{ {
"x": 98.5, "x": 86.5,
"y": 1200 "y": 1188
} }
], ],
"animated": false, "animated": false,
@ -458,12 +458,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 98.5, "x": 86.5,
"y": 1350 "y": 1338
}, },
{ {
"x": 553, "x": 541,
"y": 1350 "y": 1338
} }
], ],
"animated": false, "animated": false,
@ -497,12 +497,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 563, "x": 551,
"y": 1500 "y": 1488
}, },
{ {
"x": 1451.5, "x": 1439.5,
"y": 1500 "y": 1488
} }
], ],
"animated": false, "animated": false,
@ -536,12 +536,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1451.5, "x": 1439.5,
"y": 1650 "y": 1638
}, },
{ {
"x": 563, "x": 551,
"y": 1650 "y": 1638
} }
], ],
"animated": false, "animated": false,
@ -575,12 +575,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 553, "x": 541,
"y": 1800 "y": 1788
}, },
{ {
"x": 98.5, "x": 86.5,
"y": 1800 "y": 1788
} }
], ],
"animated": false, "animated": false,
@ -614,12 +614,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 93.5, "x": 81.5,
"y": 300 "y": 288
}, },
{ {
"x": 93.5, "x": 81.5,
"y": 1950 "y": 1938
} }
], ],
"animated": false, "animated": false,
@ -653,12 +653,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 558, "x": 546,
"y": 300 "y": 288
}, },
{ {
"x": 558, "x": 546,
"y": 1950 "y": 1938
} }
], ],
"animated": false, "animated": false,
@ -692,12 +692,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1003, "x": 991,
"y": 300 "y": 288
}, },
{ {
"x": 1003, "x": 991,
"y": 1950 "y": 1938
} }
], ],
"animated": false, "animated": false,
@ -731,12 +731,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1456.5, "x": 1444.5,
"y": 300 "y": 288
}, },
{ {
"x": 1456.5, "x": 1444.5,
"y": 1950 "y": 1938
} }
], ],
"animated": false, "animated": false,
@ -770,12 +770,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1949, "x": 1937,
"y": 300 "y": 288
}, },
{ {
"x": 1949, "x": 1937,
"y": 1950 "y": 1938
} }
], ],
"animated": false, "animated": false,

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 474 KiB

After

Width:  |  Height:  |  Size: 474 KiB

View file

@ -5,8 +5,8 @@
"id": "scorer", "id": "scorer",
"type": "", "type": "",
"pos": { "pos": {
"x": 12, "x": 0,
"y": 62 "y": 50
}, },
"width": 179, "width": 179,
"height": 141, "height": 141,
@ -44,8 +44,8 @@
"id": "scorer.t", "id": "scorer.t",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 91, "x": 79,
"y": 348 "y": 336
}, },
"width": 20, "width": 20,
"height": 1810, "height": 1810,
@ -82,8 +82,8 @@
"id": "itemResponse", "id": "itemResponse",
"type": "", "type": "",
"pos": { "pos": {
"x": 391, "x": 379,
"y": 62 "y": 50
}, },
"width": 270, "width": 270,
"height": 141, "height": 141,
@ -121,8 +121,8 @@
"id": "itemResponse.t", "id": "itemResponse.t",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 516, "x": 504,
"y": 348 "y": 336
}, },
"width": 20, "width": 20,
"height": 160, "height": 160,
@ -159,8 +159,8 @@
"id": "item", "id": "item",
"type": "", "type": "",
"pos": { "pos": {
"x": 861, "x": 849,
"y": 62 "y": 50
}, },
"width": 157, "width": 157,
"height": 141, "height": 141,
@ -198,8 +198,8 @@
"id": "item.t1", "id": "item.t1",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 929, "x": 917,
"y": 648 "y": 636
}, },
"width": 20, "width": 20,
"height": 160, "height": 160,
@ -236,8 +236,8 @@
"id": "essayRubric", "id": "essayRubric",
"type": "", "type": "",
"pos": { "pos": {
"x": 1218, "x": 1206,
"y": 62 "y": 50
}, },
"width": 245, "width": 245,
"height": 141, "height": 141,
@ -275,8 +275,8 @@
"id": "essayRubric.t", "id": "essayRubric.t",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1330, "x": 1318,
"y": 948 "y": 936
}, },
"width": 20, "width": 20,
"height": 460, "height": 460,
@ -313,8 +313,8 @@
"id": "essayRubric.t.c", "id": "essayRubric.t.c",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1325, "x": 1313,
"y": 1098 "y": 1086
}, },
"width": 30, "width": 30,
"height": 160, "height": 160,
@ -351,8 +351,8 @@
"id": "concept", "id": "concept",
"type": "", "type": "",
"pos": { "pos": {
"x": 1663, "x": 1651,
"y": 62 "y": 50
}, },
"width": 200, "width": 200,
"height": 141, "height": 141,
@ -390,8 +390,8 @@
"id": "concept.t", "id": "concept.t",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 1753, "x": 1741,
"y": 1248 "y": 1236
}, },
"width": 20, "width": 20,
"height": 50, "height": 50,
@ -428,8 +428,8 @@
"id": "itemOutcome", "id": "itemOutcome",
"type": "", "type": "",
"pos": { "pos": {
"x": 2063, "x": 2051,
"y": 62 "y": 50
}, },
"width": 265, "width": 265,
"height": 141, "height": 141,
@ -467,8 +467,8 @@
"id": "itemOutcome.t1", "id": "itemOutcome.t1",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 2185, "x": 2173,
"y": 1548 "y": 1536
}, },
"width": 20, "width": 20,
"height": 50, "height": 50,
@ -505,8 +505,8 @@
"id": "item.t2", "id": "item.t2",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 929, "x": 917,
"y": 1698 "y": 1686
}, },
"width": 20, "width": 20,
"height": 50, "height": 50,
@ -543,8 +543,8 @@
"id": "item.t3", "id": "item.t3",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 929, "x": 917,
"y": 1848 "y": 1836
}, },
"width": 20, "width": 20,
"height": 50, "height": 50,
@ -581,8 +581,8 @@
"id": "itemOutcome.t2", "id": "itemOutcome.t2",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 2185, "x": 2173,
"y": 1998 "y": 1986
}, },
"width": 20, "width": 20,
"height": 50, "height": 50,
@ -619,8 +619,8 @@
"id": "itemOutcome.t3", "id": "itemOutcome.t3",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 2185, "x": 2173,
"y": 2148 "y": 2136
}, },
"width": 20, "width": 20,
"height": 50, "height": 50,
@ -681,12 +681,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 353 "y": 341
}, },
{ {
"x": 511, "x": 499,
"y": 353 "y": 341
} }
], ],
"animated": false, "animated": false,
@ -720,12 +720,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 503 "y": 491
}, },
{ {
"x": 511, "x": 499,
"y": 503 "y": 491
} }
], ],
"animated": false, "animated": false,
@ -759,12 +759,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 653 "y": 641
}, },
{ {
"x": 924.5, "x": 912.5,
"y": 653 "y": 641
} }
], ],
"animated": false, "animated": false,
@ -798,12 +798,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 803 "y": 791
}, },
{ {
"x": 924.5, "x": 912.5,
"y": 803 "y": 791
} }
], ],
"animated": false, "animated": false,
@ -837,12 +837,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 953 "y": 941
}, },
{ {
"x": 1325.5, "x": 1313.5,
"y": 953 "y": 941
} }
], ],
"animated": false, "animated": false,
@ -876,12 +876,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 531, "x": 519,
"y": 1103 "y": 1091
}, },
{ {
"x": 1320.5, "x": 1308.5,
"y": 1103 "y": 1091
} }
], ],
"animated": false, "animated": false,
@ -915,12 +915,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1360.5, "x": 1348.5,
"y": 1253 "y": 1241
}, },
{ {
"x": 1748, "x": 1736,
"y": 1253 "y": 1241
} }
], ],
"animated": false, "animated": false,
@ -954,12 +954,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 106.5, "x": 94.5,
"y": 1403 "y": 1391
}, },
{ {
"x": 1325.5, "x": 1313.5,
"y": 1403 "y": 1391
} }
], ],
"animated": false, "animated": false,
@ -993,12 +993,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 1553 "y": 1541
}, },
{ {
"x": 2180.5, "x": 2168.5,
"y": 1553 "y": 1541
} }
], ],
"animated": false, "animated": false,
@ -1032,12 +1032,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 1703 "y": 1691
}, },
{ {
"x": 924.5, "x": 912.5,
"y": 1703 "y": 1691
} }
], ],
"animated": false, "animated": false,
@ -1071,12 +1071,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 1853 "y": 1841
}, },
{ {
"x": 924.5, "x": 912.5,
"y": 1853 "y": 1841
} }
], ],
"animated": false, "animated": false,
@ -1110,12 +1110,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 2003 "y": 1991
}, },
{ {
"x": 2180.5, "x": 2168.5,
"y": 2003 "y": 1991
} }
], ],
"animated": false, "animated": false,
@ -1149,12 +1149,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 116.5, "x": 104.5,
"y": 2153 "y": 2141
}, },
{ {
"x": 2180.5, "x": 2168.5,
"y": 2153 "y": 2141
} }
], ],
"animated": false, "animated": false,
@ -1188,12 +1188,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 101.5, "x": 89.5,
"y": 203 "y": 191
}, },
{ {
"x": 101.5, "x": 89.5,
"y": 2303 "y": 2291
} }
], ],
"animated": false, "animated": false,
@ -1227,12 +1227,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 526, "x": 514,
"y": 203 "y": 191
}, },
{ {
"x": 526, "x": 514,
"y": 2303 "y": 2291
} }
], ],
"animated": false, "animated": false,
@ -1266,12 +1266,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 939.5, "x": 927.5,
"y": 203 "y": 191
}, },
{ {
"x": 939.5, "x": 927.5,
"y": 2303 "y": 2291
} }
], ],
"animated": false, "animated": false,
@ -1305,12 +1305,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1340.5, "x": 1328.5,
"y": 203 "y": 191
}, },
{ {
"x": 1340.5, "x": 1328.5,
"y": 2303 "y": 2291
} }
], ],
"animated": false, "animated": false,
@ -1344,12 +1344,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 1763, "x": 1751,
"y": 203 "y": 191
}, },
{ {
"x": 1763, "x": 1751,
"y": 2303 "y": 2291
} }
], ],
"animated": false, "animated": false,
@ -1383,12 +1383,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 2195.5, "x": 2183.5,
"y": 203 "y": 191
}, },
{ {
"x": 2195.5, "x": 2183.5,
"y": 2303 "y": 2291
} }
], ],
"animated": false, "animated": false,

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 476 KiB

After

Width:  |  Height:  |  Size: 476 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 498 KiB

After

Width:  |  Height:  |  Size: 498 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 498 KiB

After

Width:  |  Height:  |  Size: 498 KiB