Extensions/Assessment/magnifier

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:
NameTypeAttributesDescription
optionsobject<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

setupButtons(classname) → {void}

Sets up listeners on custom buttons to toggle the magnifier.

Parameters:
NameTypeDefaultDescription
classnamestringlrn__magnifier

CSS class value of the element to launch the magnifier

Since
2.16.0
Returns: 
void

toggle() → {void}

Toggle visibility of the magnifier.

Since
2.16.0
Returns: 
void