ViewerMagnifierAPI

Interface ViewerMagnifierAPI

The ViewerMagnifierAPI allows to magnify a specified region of the current view in a viewer.

// Get an instance of the webvis context
const myContext = webvis.getContext();

// Get default viewer
const viewer = myContext.getViewer();

// Enable magnifier for viewer
viewer.changeMagnifier({enabled: true}); 

// Change magnifier properties
viewer.changeMagnifier({roundness: 50, position: [1000,720], size: [500,300], zoomLevel: 2}) ;

// Alternatively, enable magnifier and set all properties in one call
viewer.changeMagnifier({roundness: 50, enabled: true, position: [1000,720], size: [500,300], zoomLevel: 2});

The following events are associated with the ViewerMagnifierAPI:

interface ViewerMagnifierAPI {
    changeMagnifier(
        properties: ViewerMagnifierProperties,
    ): ViewerMagnifierProperties;
    getMagnifierProperties(): ViewerMagnifierProperties;
}

Hierarchy (View Summary)

Methods