WebImagePanViewer Client Object
The LEADTOOLS WebImagePanViewer control includes a client-side Javascript class to update the server control without posting the entire page back to the server. Most of the WebImagePanViewer server properties can be accessed through the Javascript class. You can access the LEADTOOLS WebImagePanViewer control on the client-side by using the ASP.NET generated ClientID on the WebForm.
Client Naming
The client-side version of the control uses the same naming convention as the server control version for easier coding. All LEADTOOLS public class definitions in the WebImageViewer.js and Utilities.js files contain the prefix "ltwf" to avoid conflicts with any other components on the page.
Client Public Methods/Properties
All server side object properties can be accessed on the client by using two methods: "GetServerPropertyName", and "SetServerPropertyName", where "ServerPropertyName" is replaced with the name of the property to be accessed or set.
The following table lists the Server properties and the mapped client methods:
Property\Method Name(Server) | Method Name(Client) | Description | Input Type |
---|---|---|---|
N/A | ID | Gets the web control identifier generated by ASP.NET. | - |
BackColor |
getBackColor():string setBackColor(value:String) |
Gets or sets the background color of the control. |
String representing the CSS background color. |
BorderColor |
getBorderColor():string setBorderColor(value:String) |
Gets or sets the border color of the control. |
String representing the CSS border color. |
BorderStyle |
getBorderStyle():string setBorderStyle(value:String) |
Gets or sets the border style of the control. |
String representing the CSS border style. |
BorderWidth |
getBorderWidth():int setBorderWidth(value:Int) |
Gets or sets the border width of the web control. |
Int representing the border width of the web control. |
Width |
getWidth():int setWidth(value:Int) |
Gets or sets the width of the web control in pixels. |
Int representing the width of the web control. |
Height |
getHeight():int setHeight(value:Int) |
Gets or sets the height of the web control in pixels. |
Int representing the height of the web control. |
WebImagePanViewer.RectangleColor |
getRectangleColor():ImageViewerAlignMode setRectangleColor(value:String) |
Gets or sets the color used to draw the Pan Rectangle. |
String representing the CSS Pan Rectangle color. |
WebImagePanViewer.HorizontalAlignMode |
getHorizontalAlignMode():ImageViewerAlignMode setHorizontalAlignMode(value:ImageViewerAlignMode) |
Gets or sets the horizontal alignment used when displaying the image. |
ImageViewerAlignMode representing the horizontal alignment used when displaying the image. (0-2), 0:Near, 1:Center, 2:Far |
Tooltip |
getTooltip():string setTooltip(value:String) |
Gets the text displayed when the mouse hovers over the web control. |
String representing the text displayed when the mouse hovers over the web control. |
getVerticalAlignMode():ImageViewerAlignMode setVerticalAlignMode(value:ImageViewerAlignMode) |
Gets or sets the vertical alignment to display the image. |
ImageViewerAlignMode (0-2), 0:Near, 1:Center, 2:Far. |
|
getViewerID():string setViewerID():string |
Gets the ID of the WebImageViewer control currently assigned for the panning process by the control. |
- |
|
Visible |
getVisible():bool setVisible(value:bool) |
Gets or sets whether show/hide the control on the web page. |
String representing whether to show/hide the control. True to show the control; false to hide it. |
Client Public Events
All public client-side Leadtools events can be overridden with your own function. The following example displays a Javascript alert whenever the ImageUrl property is changed on the WebImagePanViewer client object.
WebImagePanViewer1.BorderColorChanged = myBorderColorChanged;
function myBorderColorChanged()
{
alert("BorderColor Changed!");
}
The following table lists the Client side events that can be overridden:
Event Name(Server) | Event Name(Client) | Raised when |
---|---|---|
N/A |
BackColorChanged |
BackColor property is changed. |
N/A |
BorderColorChanged |
BorderColor property is changed. |
N/A |
BorderStyleChanged |
BorderStyle property is changed. |
N/A |
BorderWidthChanged |
BorderWidth property is changed. |
RectangleColorChanged |
RectangleColor property is changed. |
|
HorizontalAlignModeChanged |
HorizontalAlignMode property is changed. |
|
VerticalAlignModeChanged |
VerticalAlignMode property is changed. |
|
N/A |
VisibleChanged |
Visible property is changed. |
Products |
Support |
Feedback: WebImagePanViewer JavaScript Client Class |
Introduction |
Help Version 19.0.2017.6.21
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.