mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
updated highlighted space
This commit is contained in:
@ -485,18 +485,14 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool _isHighlightedSpace(SpaceModel space) {
|
bool _isHighlightedSpace(SpaceModel space) {
|
||||||
if (widget.selectedSpace == null) return true;
|
final selectedSpace = widget.selectedSpace;
|
||||||
if (space == widget.selectedSpace) return true;
|
if (selectedSpace == null) return true;
|
||||||
if (widget.selectedSpace?.parent?.internalId == space.internalId)
|
|
||||||
return true;
|
return space == selectedSpace ||
|
||||||
if (widget.selectedSpace?.children != null) {
|
selectedSpace.parent?.internalId == space.internalId ||
|
||||||
for (var child in widget.selectedSpace!.children) {
|
selectedSpace.children
|
||||||
if (child.internalId == space.internalId) {
|
?.any((child) => child.internalId == space.internalId) ==
|
||||||
return true;
|
true;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _deselectSpace(BuildContext context) {
|
void _deselectSpace(BuildContext context) {
|
||||||
|
Reference in New Issue
Block a user