INNER CODE UNIT · Dart

scaledHeight

nabil6391/graphview · lib/GraphView.dart:537

    final scaledHeight = bounds.height * scale;

    final centerOffset = Offset(
        (vp.width - scaledWidth) * widget.horizontalBias - bounds.left * scale,
        (vp.height - scaledHeight) * widget.verticalBias - bounds.top * scale);

    final target = Matrix4.identity()
      ..translate(centerOffset.dx, centerOffset.dy)
      ..scale(scale);
    animateToMatrix(target);
  }

  void animateToMatrix(Matrix4 target) {
    _panController.reset();
    _panAnimation = Matrix4Tween(
            begin: _transformationController.value, end: target)
        .animate(
            CurvedAnimation(parent: _panController, curve: Curves.linear));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…