mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 01:56:24 +00:00
provide all tags on edit space
This commit is contained in:
21
lib/pages/spaces_management/helper/connection_helper.dart
Normal file
21
lib/pages/spaces_management/helper/connection_helper.dart
Normal file
@ -0,0 +1,21 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user