mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
removed space create button out of interactive viewer
This commit is contained in:
@ -39,7 +39,10 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
||||
children: [
|
||||
_buildHeader(),
|
||||
Flexible(
|
||||
child: InteractiveViewer(
|
||||
child: Stack(
|
||||
children: [
|
||||
if (spaces.isNotEmpty)
|
||||
InteractiveViewer(
|
||||
boundaryMargin: EdgeInsets.all(500),
|
||||
minScale: 0.5,
|
||||
maxScale: 3.0,
|
||||
@ -47,15 +50,7 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
||||
child: Container(
|
||||
width: canvasWidth,
|
||||
height: canvasHeight,
|
||||
child: spaces.isEmpty
|
||||
? Center(
|
||||
child: AddSpaceButton(
|
||||
onTap: () {
|
||||
_showCreateSpaceDialog(screenSize);
|
||||
},
|
||||
),
|
||||
)
|
||||
: Stack(
|
||||
child: Stack(
|
||||
children: [
|
||||
for (var connection in connections)
|
||||
CustomPaint(
|
||||
@ -81,8 +76,7 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
||||
screenSize: screenSize,
|
||||
onHoverChanged: _handleHoverChanged,
|
||||
onPositionChanged: (newPosition) {
|
||||
_updateNodePosition(
|
||||
entry.value, newPosition);
|
||||
_updateNodePosition(entry.value, newPosition);
|
||||
},
|
||||
buildSpaceContainer: (int index) {
|
||||
return SpaceContainerWidget(
|
||||
@ -97,7 +91,16 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (spaces.isEmpty)
|
||||
Center(
|
||||
child: AddSpaceButton(
|
||||
onTap: () {
|
||||
_showCreateSpaceDialog(screenSize);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -182,7 +185,7 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
||||
Offset(
|
||||
screenSize.width / 2 - 75, // Center horizontally
|
||||
screenSize.height / 2 -
|
||||
100, // Slightly above the center vertically
|
||||
50, // Slightly above the center vertically
|
||||
);
|
||||
|
||||
SpaceData newSpace =
|
||||
|
Reference in New Issue
Block a user