Exemplo n.º 1
0
        protected override bool _isFlingGesture(VelocityEstimate estimate)
        {
            float minVelocity = minFlingVelocity ?? Constants.kMinFlingVelocity;
            float minDistance = minFlingDistance ?? Constants.kTouchSlop;

            return(Mathf.Abs(estimate.pixelsPerSecond.dx) > minVelocity && Mathf.Abs(estimate.offset.dx) > minDistance);
        }
Exemplo n.º 2
0
        protected override bool _isFlingGesture(VelocityEstimate estimate)
        {
            double minVelocity = this.minFlingVelocity ?? Constants.kMinFlingVelocity;
            double minDistance = this.minFlingDistance ?? Constants.kTouchSlop;

            return(Math.Abs(estimate.pixelsPerSecond.dy) > minVelocity && Math.Abs(estimate.offset.dy) > minDistance);
        }
Exemplo n.º 3
0
        protected override bool _isFlingGesture(VelocityEstimate estimate)
        {
            float minVelocity = this.minFlingVelocity ?? Constants.kMinFlingVelocity;
            float minDistance = this.minFlingDistance ?? Constants.kTouchSlop;

            return(estimate.pixelsPerSecond.distanceSquared > minVelocity * minVelocity &&
                   estimate.offset.distanceSquared > minDistance * minDistance);
        }
Exemplo n.º 4
0
        public Velocity getVelocity()
        {
            VelocityEstimate estimate = getVelocityEstimate();

            if (estimate == null || estimate.pixelsPerSecond == Offset.zero)
            {
                return(Velocity.zero);
            }

            return(new Velocity(pixelsPerSecond: estimate.pixelsPerSecond));
        }
Exemplo n.º 5
0
 protected abstract bool _isFlingGesture(VelocityEstimate estimate);