findById Method

Summary

Finds an interactive mode in the collection given its id.

Syntax

JavaScript Syntax
ImageViewerInteractiveModes.prototype.findById = function(id) 
TypeScript Syntax
findById(id: number): ImageViewerInteractiveMode; 

Parameters

id

ID to find

Return Value

The interactive mode found if any, null otherwise.

Remarks

This method will iterate through all the items in the collection and return the mode where id. If no such mode is found then it will return null.

Example

JavaScript Example
var panZoom = new lt.Controls.ImageViewerPanZoomInteractiveMode(); 
panZoom = this._imageViewer.interactiveModes.findById(lt.Controls.ImageViewerInteractiveMode.panZoomModeId); 
var inertiaOptions = panZoom.inertiaScrollOptions; 
inertiaOptions.isEnabled = true; 
panZoom.inertiaScrollOptions = inertiaOptions; 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly