This topic explains, with code examples, how to configure the zoom action and the zoom window of the igZoombar
™ control.
The following topics are prerequisites to understanding this topic:
igZoombar Overview: This topic provides conceptual information about the igZoombar
control and the functionalities it provides including the supported user interactions and some configuration basics.
Adding igZoombar: This topic explains, with code examples, how to add the igZoombar
control to an HTML page and an ASP.NET MVC application.
This topic contains the following sections:
By default, the zoom-range window is positioned at the center of the igZoombar
control and spans over 30 percent of its total breadth (= 100%). The zoom-range window can be sized down to 5 percent of the control’s total breadth. The default refresh mode is Immediate.
The following table lists the igZoombar
properties and their settings that form the default configuration of the control.
Property | Type | Default Value | Description |
---|---|---|---|
defaultZoomWindow.left | number | 35 | The starting (left) edge of the zoom-range window is placed at 35 percent of the total breadth of the igZoombar control, counted from its starting (left) edge. |
defaultZoomWindow.width | number | 30 | The width of the zoom-range window is set to 30 percent of the total breadth of the igZoombar control. |
zoomWindowMinWidth | number | 5 | The zoom-range window can be sized down by the user to 5 percent of the control’s total breadth. |
zoomAction | string | “immediate” | The default refresh mode is Immediate. |
The following table lists the configurable aspects of igZoombar
. Further details on most of them are available after the table.
Configurable aspect | Details | Properties |
---|---|---|
Initial zoom-range window size and position | The initial breadth and position of the zoom-range window can be configured. | |
Minimum zoom-range window size | The minimum breadth of the zoom-range window is a size limit under which users cannot shrink the window any further. This minimum size is configurable. | |
Refresh upon zoom interaction |
The igZoombar control can be configured to one of the following refresh modes based on how the control responds to zoom interactions performed by the user:
|
|
Movement step of the zoom-range window | The step, with which the zoom-range window shifts upon clicking/tapping the navigation buttons on the scrollbar or pressing the Left/Right arrow keys on the keyboard, is configurable. |
By default, the zoom-range window is positioned at 35 percent of the total width of the igZoombar
control counted from its starting (left) edge, and its breadth is set to 30 percent of the total width of control. This effectively places the zoom-range window in the center of the available scrollable range.
You can change the breadth of the window and position anywhere within the range.
The following table maps the desired configuration to property settings. All properties as set as a percentage of the total width of the control, counted from its starting (left) edge.
In order to configure: | Use this property: | And set it to: |
---|---|---|
The position of the starting (left) edge of the zoom-range window | defaultZoomWindow.left | The desired percentage number |
The breadth of the zoom-range window | defaultZoomWindow.width | The desired percentage number |
The code below demonstrates setting the zoom-range window to the utmost-right position on the range upon the initialization of the igZoombar
control as a result of the following settings:
Property | Value |
---|---|
defaultZoomWindow.left | 70 |
defaultZoomWindow.width | 30 |
In JavaScript:
$("#zoom").igZoombar({
defaultZoomWindow: {
left: 70,
width: 30
}
});
The minimum breadth of the zoom-range window is a size limit under which users cannot shrink (zoom in) the window any further. This limit prevents conflicts in case the range-based control with which igZoombar
is integrated has lower zooming threshold than igZoombar
. Setting the minimum breadth of the zoom-range window constrains the user from crossing that threshold.
This minimum breadth of the zoom-range window is configurable. By default, it is set to 5 percent of the total breadth of the igZoombar
control.
The following table maps the desired configuration to the property settings that manage it.
In order to configure: | Use these properties: | And set it to: |
---|---|---|
The minimum size of the zoom-range window | zoomWindowMinWidth | The desired number as a percentage of the total width of the control, counted from its starting (left) edge |
The code below demonstrates setting the minimum breadth of the zoom-range window width to 10 percent of the total width of the igZoombar
control, counted from its starting (left) edge:
Property | Value |
---|---|
zoomWindowMinWidth | 10 |
In JavaScript:
$("#zoom").igZoombar({
zoomWindowMinWidth: 10
});
The Refresh mode controls the refresh action of the component to which igZoombar
is attached. The igZoombar
control can be configured to one of the following refresh modes based on how the control responds to zoom interactions performed by the user:
igZoombar
controligZoombar
to this mode when the control operates in a data-intensive environment and the immediate refresh might operate with unacceptable latency or stall the application.The Refresh mode is configured with the zoomAction property.
The following table maps the desired configuration to property settings.
In order to configure the Refresh mode to: | Use these properties: | And set it to: |
---|---|---|
Deferred | zoomAction | “deferred” |
Immediate | zoomAction | “immediate” |
The code below demonstrates configuring the Refresh mode of the igZoombar
control to Deferred:
Property | Value |
---|---|
zoomAction | “deferred” |
In JavaScript:
$("#zoom").igZoombar({
zoomAction: "deferred"
});
The following topics provide additional information related to this topic.
Accessibility Compliance (igZoombar): This topic explains the accessibility features of the igZoombar
control and provides information on how to achieve accessibility compliance for pages containing this control.
Known Issues and Limitations (igZoombar): This topic describes the known issues and limitations of the igZoombar
control and the available workarounds.
jQuery and MVC API Links (igZoombar): This topic provides links to the API reference documentation about the igZoombar
control and the ASP.NET MVC Helper for it.
The following samples provide additional information related to this topic.
igZoombar
in an igDataChart
control showing financial data.View on GitHub