LEADTOOLS JavaScript (Leadtools.Controls)
LEAD Technologies, Inc

MouseWheelInteractiveMode Property


Gets or sets the ImageViewerInteractiveMode that the viewer control should use to process mouse wheel events.
Syntax
  get_mouseWheelInteractiveMode();
 set_mouseWheelInteractiveMode(value);
!MISSING Scrap '_RTJavaScript_PROPERTY_SYNTAX'!

Property Value

TypeDescription
ImageViewerInteractiveModeThe interactive mode for mouse wheel events in the viewer control. Default value is null.
Remarks

Note: The mouse wheel interactive mode will be functional only if the value of InteractiveService.EnableMouseWheel is true (the default value).

The current InteractiveService will convert mouse wheel events to DragStarted/ InteractiveService.DragDelta%InteractiveService.DragCompleted:E:Leadtools.Controls.InteractiveService.DragCompleted% events. For example, ImageViewerPanZoomInteractiveMode does not need to do anything special to handle mouse wheel events since it already subscribes to these events and you can set an instance of this class directly in MouseWheelInteractiveMode.

To use an interactive mode, you create an instance of any of the derived classes and assign it to the viewer using one of the following methods:

On desktop browsers, you can use multiple interactive modes at the same time. For example, you can use the following code to support panning/zooming with the left mouse button and magnify glass with the right button:

    
            viewer.setMouseInteractiveMode(Leadtools.Controls.MouseButton.left, new Leadtools.Controls.ImageViewerCenterAtInteractiveMode());
            viewer.setMouseInteractiveMode(Leadtools.Controls.MouseButton.right, new Leadtools.Controls.ImageViewerMagnifyGlassInteractiveMode());
            viewer.set_MouseWheelInteractiveMode(new Leadtools.Controls.ImageViewerPanZoomInteractiveMode());
            

  

On browsers that support only touch, such as mobile phones and tablets, you can use only one interactive mode at a time. This does not mean only one finger touch is supported, some of the interactive modes such as ImageViewerPanZoomInteractiveMode supports multiple touch operations such as pinch to zoom.

Example

For an example, refer to SetMouseInteractiveMode.

See Also

Reference

ImageViewer Object
ImageViewer Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.