|
GLG Toolkit, JavaScript Library
Version 4.6
|
This group contains methods for zooming, panning and scrolling GLG drawings, charts and GIS map objects. More...
This group contains methods for zooming, panning and scrolling GLG drawings, charts and GIS map objects.
Functions | |
| boolean | SetZoom (String resource_name, char type, double value) |
| Provides a programmatic interface to integrated zooming and panning. More... | |
| boolean | SetZoomMode (String resource_name, GlgObject zoom_object, String zoom_object_resource_name, GlgZoomMode zoom_mode) |
| Sets or resets the viewport's zoom mode by supplying a GIS or Chart object to be zoomed. More... | |
| boolean SetZoom | ( | String | resource_name, |
| char | type, | ||
| double | value | ||
| ) |
Provides a programmatic interface to integrated zooming and panning.
This method is invoked on a viewport or a light viewport to perform a zooming or panning operation.
| resource_name | A resource path of a child viewport to zoom or pan, or null to zoom or pan the viewport the method is invoked on. The resource path is relative to the invoking object. |
| type | A character value that specifies the type of the zoom or pan operation to perform. For example, 'i' may be used to zoom in. The value of this parameter matches the corresponding zooming and panning accelerators:
|
| value | Specifies a value for zoom and pan operations as described above. |
This method performs a specified zoom or pan operation regardless of the setting of the viewport's Pan and ZoomEnabled attributes.
Zooming and panning keyboard accelerators may also be used by settings a viewport's ZoomEnabled attribute to true (the user may have to click on the viewport first to set the keyboard focus). This is especially useful for interactive testing of integrated zooming and panning in the GLG Graphics Builder.
The viewport's Pan attribute can be used to activate integrated scrollbars for scrolling the drawing, as well as scrolling charts and GIS maps.
In the Drawing Zoom Mode, if the method attempts to set a very large zoom factor which would result in the overflow of the integer coordinate values used by the native windowing system, the zoom operation is not performed and the method returns false.
The left mouse button is the default button for performing the ZoomTo operation, as well as for panning and scrolling the drawing by dragging it with the mouse. These defaults can be changed by setting the GlgZoomToButton and GlgPanDragButton global configuration resources. If the default is changed, the left-click used in the description of the affected operations changes to the click with the mouse button assigned to the respective ZoomTo or Pan operation.
| boolean SetZoomMode | ( | String | resource_name, |
| GlgObject | zoom_object, | ||
| String | zoom_object_resource_name, | ||
| GlgZoomMode | zoom_mode | ||
| ) |
Sets or resets the viewport's zoom mode by supplying a GIS or Chart object to be zoomed.
In the Drawing Zoom Mode (default), the drawing displayed in the viewport is zoomed and panned. If the GIS Zoom Mode is set, any zooming and panning operation performed by SetZoom will zoom and pan the map displayed in the viewport's GIS Object, instead of being applied to the viewport's drawing. In the Chart Zoom Mode, the content of the chart is zoomed and panned.
| resource_name | A resource path of a child viewport whose zoom mode to set, or null to set the Zoom Mode of the viewport the method is invoked on. The resource path is relative to the invoking object. |
| zoom_object | GIS or Chart object to be zoomed in the GIS and Chart zooming modes (or null for the Drawing zoom mode):
|
| zoom_object_resource_name | Resource name of the GIS or Chart object.
|
| zoom_mode | The zoom mode to set:
|