mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
22 lines
626 B
Dart
22 lines
626 B
Dart
import 'dart:ui';
|
|
|
|
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/connection_model.dart';
|
|
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/space_model.dart';
|
|
|
|
class ConnectionHelper {
|
|
static Offset getCenterPosition(Size screenSize) {
|
|
return Offset(
|
|
screenSize.width / 2 - 260,
|
|
screenSize.height / 2 - 200,
|
|
);
|
|
}
|
|
|
|
static bool isHighlightedConnection(
|
|
Connection connection, SpaceModel? selectedSpace) {
|
|
if (selectedSpace == null) return true;
|
|
|
|
return connection.startSpace == selectedSpace ||
|
|
connection.endSpace == selectedSpace;
|
|
}
|
|
}
|