Home > @modelo.io/api > MagnifyGlass

MagnifyGlass class

This tool allows users to zoom into specific region defined by a rectanglar on the screen.

Signature:

export default class MagnifyGlass extends Tool 

Constructors

ConstructorDescription
(constructor)(viewer)Create a magnify glass tool.

Methods

MethodDescription
setEnabled(enabled)Set the mangnify glass tool enabled.
setLineWidth(lineWidth)Set the line with of the magnify glass border.

Remarks

The magnify glass tool requires mouse input and mouse input should be added to the viewer before the tool.

Example

viewer.addInput(new Modelo.View.Input.Mouse(viewer));
var magnifyGlass = new Modelo.View.Tool.MagnifyGlass(viewer);
viewer.addTool(magnifyGlass);