Global

Type Definitions


MagModel

Type:
  • Object
Properties:
Name Type Description
zoom number

Zoom level, from (0,∞).

focus MagModelFocus

Focus object.

lens MagModelLens

Lens object.

Source:

MagModelFocus

Type:
  • Object
Properties:
Name Type Description
x number

X position, from [0,1].

y number

Y position, from [0,1].

Source:

MagModelLens

Type:
  • Object
Properties:
Name Type Description
w number

Width, from (0,∞).

h number

Height, from (0,∞).

Source:

MagnificentOptions

Default options.

Properties:
Name Type Description
mode string

"inner"
(default) Zoom region embedded in thumbnail.

"outer"
Zoom region independent of thumbnail.

position string | boolean

What interaction(s) position zoomed region.


"mirror"
(default) Zoomed region follows mouse/pointer.

"drag"
Drag to move.

"joystick"
Weird joystick interaction to move.

false
No mouse/touch.

positionEvent string

Controls what event(s) cause positioning.


"move"
(default) On move (e.g. mouseover).

"hold"
On hold (e.g. while mousedown).

theme string

Themes apply a style to the widgets.


"default"
(default) Default theme.

initialShow string

"thumb"
(default) Whether to show thumbnail or zoomed first,
e.g. in "inner" mode.

zoomRate number

Rate at which to adjust zoom, from (0,∞). Default = 0.2.

zoomMin number

Minimum zoom level allowed, from (0,∞). Default = 2.

zoomMax number

Maximum zoom level allowed, from (0,∞). Default = 10.

dragRate number

Rate at which to drag, from (0,∞). Default = 0.2.

ratio number

Ratio of outer (w/h) to inner (w/h) container ratios. Default = 1.

constrainLens boolean

Whether lens position is constrained. Default = true.

constrainZoomed boolean

Whether zoomed position is constrained. Default = false.

toggle boolean

Whether toggle display of zoomed vs. thumbnail upon interaction. Default = true.

smooth boolean

Whether the zoomed region should gradually approach target, rather than immediately. Default = true.

cssMode string

CSS mode to use for scaling and translating. Either '3d', '2d', or 'position'. Default = '3d'.

renderIntervalTime number

Milliseconds for render loop interval. Adjust for performance vs. frame rate. Default = 20.

initial MagModel

Initial settings for model - focus, lens, zoom, etc.

Source:

MagOptions

Type:
  • Object
Properties:
Name Type Description
model MagModel

A model.

zoomMin number

Minimum zoom level allowed, from (0,∞).

zoomMax number

Maximum zoom level allowed, from (0,∞).

constrainLens boolean

Whether lens position is constrained.

constrainZoomed boolean

Whether zoomed position is constrained.

Source: