mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-26 12:14:55 +00:00
applied opacity to connections
This commit is contained in:
@ -127,7 +127,12 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
for (var connection in connections)
|
for (var connection in connections)
|
||||||
CustomPaint(painter: CurvedLinePainter([connection])),
|
Opacity(
|
||||||
|
opacity: _isHighlightedConnection(connection)
|
||||||
|
? 1.0
|
||||||
|
: 0.3, // Adjust opacity
|
||||||
|
child: CustomPaint(painter: CurvedLinePainter([connection])),
|
||||||
|
),
|
||||||
for (var entry in visibleSpaces.asMap().entries)
|
for (var entry in visibleSpaces.asMap().entries)
|
||||||
Positioned(
|
Positioned(
|
||||||
left: entry.value.position.dx,
|
left: entry.value.position.dx,
|
||||||
@ -601,4 +606,11 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _isHighlightedConnection(Connection connection) {
|
||||||
|
if (widget.selectedSpace == null) return true;
|
||||||
|
|
||||||
|
return connection.startSpace == widget.selectedSpace ||
|
||||||
|
connection.endSpace == widget.selectedSpace;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user