Interface IZoomableView

Supports semantic zoom functionality by exposing a control as either the zoomed in or the zoomed out view of the SemanticZoom control.

Index

Methods

Methods

public beginZoom()

Initiates semantic zoom on the custom control.

public configureForZoom(isZoomedOut: boolean, isCurrentView: boolean, triggerZoom: Function, prefetchedPages: number)

Initializes the semantic zoom state for the custom control.

Parameters

  • isZoomedOut: boolean

    True if this is the zoomed out view; otherwise false.

  • isCurrentView: boolean

    True if this is the current view; otherwise false.

  • triggerZoom: Function

    The function that manages semantic zoom behavior. Triggers a zoom in or zoom out if the control is the visible control.

  • prefetchedPages: number

    The number of pages of content to pre-fetch for zooming. This value is dependent on the size of the semantic zoom container. More content can be displayed based on the zoom factor and the size of the container.

public endZoom(isCurrentView: boolean)

Terminates semantic zoom on the zoomed in or zoomed out child of the custom control.

Parameters

  • isCurrentView: boolean

    True if the control is the visible control; otherwise false.

public getCurrentItem(): Promise

Retrieves the current item of the zoomed in or zoomed out child of the custom control.

Returns

Promise

An object that represents the selected item. This return value must be a Promise for the following: item, position.

public getPanAxis(): string

Retrieves the panning axis of the zoomed-in or zoomed-out child of the custom control.

Returns

string

Identifies the panning axis of the child control. Implementation specific.

public handlePointer(pointerId: string)

Manages pointer input for the custom control.

Parameters

  • pointerId: string

    The ID of the pointer.

public positionItem(item: T in WinJS.UI.IZoomableView<T>, position: IPosition)

Positions the specified item within the viewport of the child control when panning or zooming begins.

Parameters

  • item: T in WinJS.UI.IZoomableView<T>

    The object to position within the viewport of the child control. item can be a number, a string, or an object with any number of properties.

  • position: IPosition

    An object that contains the position data of the item relative to the child control. position must be an object with four number properties: left, top, width, and height. These values specify a rectangle that is typically the bounding box of the current item, though the details are up to the control. The units of the position must be in pixels. And the coordinates must be relative to the top-left of the control viewport (which should occupy the same area as the semantic zoom viewport), except when in RTL mode. In RTL mode, return coordinates relative to the top-right off the control viewport. The rectangle is transformed from the coordinate system of one control to that of the other.

public setCurrentItem(x: number, y: number)

Selects the item closest to the specified screen coordinates.

Parameters

  • x: number

    The x-coordinate in DIPs relative to the upper-left corner of the SemanticZoom viewport.

  • y: number

    The y-coordinate in DIPs relative to the upper-left corner of the SemanticZoom viewport..