INNER CODE UNIT · Dart
translation
nabil6391/graphview · lib/GraphView.dart:508
final translation = center - scaledNodeCenter;
final target = Matrix4.identity()
..translate(translation.dx, translation.dy)
..scale(currentScale);
if (animated) {
animateToMatrix(target);
} else {
_transformationController.value = target;
}
}
void resetView() => animateToMatrix(Matrix4.identity());
void zoomToFit() {
var graph = widget.delegate.getVisibleGraphOnly();
final renderBox = context.findRenderObject() as RenderBox?;