anchor.diff:      oldWidget.scaleType != widget.scaleType
           && widget.scaleType != PhotoViewScaleType.zooming
       ){
  -      _scaleAnimation = new Tween<double>(
  -        begin: _scale == null ? getScaleForScaleType(
  +      animateScale(
  +          _scale == null ? getScaleForScaleType(
               imageInfo: widget.imageInfo,
               scaleType: PhotoViewScaleType.contained,
               size: MediaQuery.of(context).size
  -        ) : _scale,
  -        end: getScaleForScaleType(
  -            imageInfo: widget.imageInfo,
  -            scaleType: widget.scaleType,
  -            size: MediaQuery.of(context).size
  -        ),
  -      ).animate(_scaleAnimationController);
  -      _scaleAnimationController
  -        ..value = 0.0
  -        ..fling(velocity: 0.4);
  -
  -      _positionAnimation = new Tween<Offset>(
  -          begin: _position,
  -          end: Offset.zero
  -      ).animate(_positionAnimationController);
  -      _positionAnimationController
  -        ..value = 0.0
  -        ..fling(velocity: 0.4);
  +          ) : _scale,
  +          getScaleForScaleType(
  +              imageInfo: widget.imageInfo,
  +              scaleType: widget.scaleType,
  +              size: MediaQuery.of(context).size
  +          )
  +      );
  +      animatePosition(_position, Offset.zero);
       }
     }
   
  
positive.code:       widget.onStartPanning();
      }
      setState(() {
        _scale = newScale.clamp(widget.minScale, widget.maxScale);
        _position = clampPosition(delta * (newScale / _scaleBefore)) / details.scale;
      });
    }
  
    void onScaleEnd(ScaleEndDetails details) {
    }
  
    Offset clampPosition(Offset offset) {
  
negative.code:     );
    }
  
    void animateScale(double from, double to){
      _scaleAnimation = new Tween<double>(
        begin: from,
        end: to,
      ).animate(_scaleAnimationController);
      _scaleAnimationController
        ..value = 0.0
        ..fling(velocity: 0.4);
    }
  
    void animatePosition(Offset from, Offset to){
      _positionAnimation = new Tween<Offset>(
          begin: from,
          end: to
      ).animate(_positionAnimationController);
      _positionAnimationController
        ..value = 0.0
        ..fling(velocity: 0.4);
    }
  
    @override
    void initState(){
      super.initState();
  