mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 15:39:41 +00:00
Refactor CommunityStructureCanvas to improve widget structure by rearranging the InteractiveViewer and GestureDetector hierarchy. This change enhances readability and maintainability while ensuring proper interaction handling.
This commit is contained in:
@ -453,17 +453,17 @@ class _CommunityStructureCanvasState extends State<CommunityStructureCanvas>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final treeWidgets = _buildTreeWidgets();
|
final treeWidgets = _buildTreeWidgets();
|
||||||
return InteractiveViewer(
|
return GestureDetector(
|
||||||
transformationController: _transformationController,
|
onTap: _resetSelectionAndZoom,
|
||||||
boundaryMargin: EdgeInsets.symmetric(
|
child: InteractiveViewer(
|
||||||
horizontal: context.screenWidth * 0.3,
|
transformationController: _transformationController,
|
||||||
vertical: context.screenHeight * 0.3,
|
boundaryMargin: EdgeInsets.symmetric(
|
||||||
),
|
horizontal: context.screenWidth * 0.3,
|
||||||
minScale: 0.5,
|
vertical: context.screenHeight * 0.3,
|
||||||
maxScale: 3.0,
|
),
|
||||||
constrained: false,
|
minScale: 0.5,
|
||||||
child: GestureDetector(
|
maxScale: 3.0,
|
||||||
onTap: _resetSelectionAndZoom,
|
constrained: false,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: context.screenWidth * 5,
|
width: context.screenWidth * 5,
|
||||||
height: context.screenHeight * 5,
|
height: context.screenHeight * 5,
|
||||||
|
Reference in New Issue
Block a user