Allows the end-user to launch a magnifier to move around the screen and zoom in on whatever content they move it on top of.
TODO:
- make movable via keyboard
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options | object | <optional> | Object of configuration options. |
Example
const options = {
zoom: 4,
shape: 'square',
width: 310,
height: 310,
}
LT.init(itemsApp, {
extensions: [
{ id: 'magnifier', args: options },
],
});
Methods
hide() → {void}
Hides the magnifier if it is currently visible. If the magnifier is already hidden, it does nothing.
- Since
- 3.0.0
- Returns:
- void
setupButtons(classname) → {void}
Sets up listeners on custom buttons to toggle the magnifier.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
classname | string | lrn__magnifier | CSS class value of the element to launch the magnifier |
- Since
- 2.16.0
- Returns:
- void
show() → {void}
Shows the magnifier if it is currently hidden. If the magnifier is already visible, it does nothing.
- Since
- 3.0.0
- Returns:
- void
toggle() → {void}
Toggle visibility of the magnifier.
- Since
- 2.16.0
- Returns:
- void