CalculateInertiaCallback Delegate

Summary

A callback type used in custom and default inertia function implementations.

Syntax
TypeScript
JavaScript
function lt.Controls.CalculateInertiaCallback( 
   inertiaParams 
) 
interface lt.Controls.CalculateInertiaCallback { 
	( 
   inertiaParams: InertiaParams 
): LeadPointD; 
} 

Parameters

inertiaParams

The InertiaParams object for this calculation.

Return Value

A LeadPointD indicating what the offset should be from InertiaParams.Target's current scroll offset.

Remarks

To provide your own custom inertia scroll callback, provide a CalculateInertiaCallback function to ControlInertiaScrollOptions.CalculateInertia. The function can make use of InertiaParams to create their own deceleration for the inertia scroll. The return LeadPointD should move away from 0 as time passes; it will be added to the scroll offset of the InertiaParams.Target. InertiaParams.Stop must be used to end the inertia scroll. Failure to set InertiaParams.Stop to true may cause the inertia scroll to run indefinitely.

Requirements
Target Platforms
See Also

Reference

Leadtools.Controls Namespace

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.