mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
add ongoing and incoming connections
This commit is contained in:
@ -209,11 +209,14 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
||||
SpaceModel parentSpace = spaces[parentIndex];
|
||||
newSpace.parent = parentSpace;
|
||||
parentSpace.children.add(newSpace);
|
||||
connections.add(Connection(
|
||||
final newConnection = Connection(
|
||||
startSpace: parentSpace,
|
||||
endSpace: newSpace,
|
||||
direction: direction,
|
||||
));
|
||||
);
|
||||
connections.add(newConnection);
|
||||
newSpace.addIncomingConnection(newConnection);
|
||||
parentSpace.addOutgoingConnection(newConnection);
|
||||
}
|
||||
|
||||
spaces.add(newSpace);
|
||||
@ -239,5 +242,6 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
||||
// Save to local storage, a file, or send to a backend
|
||||
print('Spaces: ${spaceData}');
|
||||
print('Connections: ${connectionData}');
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user