Expose InteractiveViewer properties on GraphView.builder#156
Open
4rthurmonteiro wants to merge 2 commits into
Open
Expose InteractiveViewer properties on GraphView.builder#1564rthurmonteiro wants to merge 2 commits into
4rthurmonteiro wants to merge 2 commits into
Conversation
- Added customization options for InteractiveViewer in README.md - Cleaned up analysis_options.yaml by removing unnecessary comments - Updated force_directed_graphview.dart to ensure proper state initialization - Refined graph_cluster_animated.dart by making graph and algorithm final - Updated pubspec.lock with new package versions - Improved Graph.dart and GraphView.dart for better readability and structure - Enhanced SugiyamaAlgorithm.dart and SugiyamaEdgeRenderer.dart for code clarity - Removed unused code in controller_tests.dart and graph_test.dart
New backward-compatible InteractiveViewer properties on GraphView.builder. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GraphView.builderwraps its content in anInteractiveViewerto provide pan/zoom, but its configuration (zoom limits, pan/scale enablement, interaction callbacks, etc.) was hardcoded. This PR exposes the most commonly usedInteractiveViewerproperties directly onGraphView.builder—clipBehavior,panAxis,boundaryMargin,minScale,maxScale,interactionEndFrictionCoefficient,onInteractionStart/Update/End,panEnabled,scaleEnabled,scaleFactor,alignment, andtrackpadScrollCausesScale— so consumers can customize pan/zoom behavior without reaching into the widget tree.GraphViewfields (panAnimationDuration,toggleAnimationDuration,initialNode,autoZoomToFit,delegate) tofinal, since they were only ever set through the constructor.Matrix4transform calls (translate/scale) to their newertranslateByDouble/scaleByDoubleequivalents, and fixedEdge.operator==to take a non-nullableObjectper the standardObject.==signature.dart formatacross the touched files (GraphView.dart,Graph.dart,SugiyamaAlgorithm.dart,SugiyamaEdgeRenderer.dart, and example files), which accounts for most of the diff noise.README.md.Test plan
flutter testpassesscaleEnabled: false/panEnabled: falsedisable the respective gestures