Documentation
Zoom
Description
The Zoom module allows to zoom in on the lesson's page (.ic_page
element) and interact with modules while zoomed in.
If the lesson page does not fit on the screen then note that the zoomed in area will also not fit on the page. However using the scroll, it will be possible to get to the specified area. For this reason, it is recommended to test if the set width and height of the module for the mobile layout is sufficient so that the user does not have to scroll too much.
Modules embedded in the header and footer that need scale information (like e.g. the Ordering module) will work incorrectly when zoomed in by the Zoom module (even if neither header nor footer is zoomed in).
The module must not be placed in the header or footer to work properly.
Requirements
If the content of the player is scaled then to make the module work, it is necessary to set the scale information using the player.setScaleInformation
command. Learn more about scale information by visiting the Scale Information section.
Properties
The list starts with the common properties. Learn more about them by visiting the Modules description section. The other available properties are described below.
Property name | Description |
---|---|
Mode |
|
Supported commands
Command name | Params | Description |
---|---|---|
hide | --- | Hides the module if it is visible. |
show | --- | Shows the module if it is hidden. |
zoomIn | xPosition, yPosition | Zoom twice in at position relative to page. If the page is already zoomed in, use the `zoomOut` command first. For more information about the page, see the documentation. The command is available regardless of the chosen 'Mode' property. The command will execute, even if the values are specified by the user that would make the zoom not inside the page border. For such a situation, the zoom will execute, but the module will modify the user-specified values to ones where the zoomed area will be inside the page boundary. |
zoomInArea | xCenterPosition, yCenterPosition, areaWidth, areaHeight | Zoom in on the area relative to page. If the page is already zoomed in, use the `zoomOut` command first. For more information about the page, see the documentation. The command is available regardless of the chosen 'Mode' property. The command will execute, even if the values are specified by the user that would make the zoom not inside the page border. For such a situation, the zoom will execute, but the module will modify the user-specified values to ones where the zoomed area will be inside the page boundary. |
zoomOut | --- | Zoom out. |
Events
This module does not send events.
CSS classes
Class name | Description |
---|---|
.zoom-wrapper | Module's main class for zoom in elements. |
.zoom-wrapper.targeted-area | Indicates the style that applies to module's zoom wrapper when the "Targeted area" mode is chosen. |
.zoom-wrapper.area-around-clicked-point | Indicates the style that applies to module's zoom wrapper when thge "Area around a clicked point" mode is chosen. |
.zoom-wrapper.zoom-wrapper-highlight | Indicates the style that applies to module's zoom wrapper while mouse is over the zoom in button. Available when the "Targeted area" mode is chosen. |
.zoom-wrapper .zoom-button-container | Indicates the style that applies to the container of the zoom in button. |
.zoom-wrapper .zoom-button-container .zoom-button | Indicates the style that applies to the zoom in button. |
.zoom-wrapper .zoom-button-container .zoom-button.selected | Indicates the style that applies to the selected zoom in button. |
.zoomed-area-container | Indicates the style that applies to the fixed div element created in the body of the document when zoomed in. Position and size are calculated to match the visible content of player. |
.zoomed-area-container .zoom-out-button-container | Indicates the style that applies to the container of the zoom out button. |
.zoomed-area-container .zoom-out-button-container .zoom-out-button | Indicates the style that applies to the zoom out button. |
.ic_page.zoom-cursor-zoom-in | Indicates the style that applies to the page when the next click on the page will zoom in to the selected position. |
.ic_page.zoom-zoomed-in | Indicates the style that applies to the page when it has been zoomed in by the Zoom module. |
Keyboard navigation
- Esc - zoom out.
Modules and functionalities without support or partial support for zoomed in area by Zoom module
- IWB Toolbar
- Slider
- PieChart
- Points and Lines
- Editable Window
- File Sender
- Glossary
- Open Popup Button
- Command showPopup
- mAuthor and mCourser "Full screen" and "Fit full page" options
Demo presentation
Demo presentation contains examples on how to use the Zoom module.