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.

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

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,
}
Parameters:
Name Type Description
options object

Optional config object to override defaults

setupButtons(classname)

Sets up listeners on custom buttons to toggle the magnifier.

Since
2.16.0
Parameters:
Name Type Description
classname string

CSS class value of the element to launch the magnifier

toggle()

Toggle visibility of the magnifier.

Since
2.16.0