Extensions/Assessment/magnifier

Extensions add specific functionality to Items API. They rely on modules within LT being available.

--

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

Methods

run(options)

Initialises the screen magnifier.

Parameters:
NameTypeDescription
optionsobject

Optional config object to override defaults

Since
0.7.0
Example
import { LT } from '@caspingus/lt/assessment';

LT.init(itemsApp); // Set up LT with the Items API application instance variable
LT.extensions.magnifier.run();

Options argument to override defaults which are:
{
    zoom: 4,
    shape: 'square',
    width: 310,
    height: 310,
}

setupButtons(classname)

Sets up listeners on custom buttons to toggle the magnifier.

Parameters:
NameTypeDescription
classnamestring

CSS class value of the element to launch the magnifier

Since
2.16.0

toggle()

Toggle visibility of the magnifier.

Since
2.16.0