Class SemanticZoom

Enables the user to zoom between two different views supplied by two child controls. One child control supplies the zoomed-out view and the other provides the zoomed-in view.

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(element?: HTMLElement, options?: any): SemanticZoom

Creates a new SemanticZoom.

constructor

Parameters

  • element?: HTMLElement optional

    The DOM element that hosts the SemanticZoom.

  • options?: any optional

    An object that contains one or more property/value pairs to apply to the new control. This object can contain these properties: initiallyZoomedOut Boolean, zoomFactor 0.2–0.85.

Returns

SemanticZoom

Properties

public element: HTMLElement

Gets the DOM element that hosts the SemanticZoom control.

public enableButton: boolean

Gets or a sets a value that specifies whether to display the SemanticZoom zoom out button.

public isDeclarativeControlContainer: boolean

Determines whether any controls contained in a SemanticZoom should be processed separately. This property is always true, meaning that the SemanticZoom takes care of processing its own controls.

public locked: boolean

Gets or sets a value that indicates whether SemanticZoom is locked and zooming between views is disabled.

public zoomFactor: number

Gets or sets a value that specifies how much the scaling the cross-fade animation performs when the SemanticZoom transitions between views.

public zoomedOut: boolean

Gets or sets a value that indicates whether the control is zoomed out.

Methods

public addEventListener(eventName: string, eventHandler: Function, useCapture?: boolean)

Registers an event handler for the specified event.

Parameters

  • eventName: string

    The name of the event to handle.

  • eventHandler: Function

    The event handler function to associate with the event.

  • useCapture?: boolean optional

    Set to true to register the event handler for the capturing phase; otherwise, set to false to register the event handler for the bubbling phase.

public dispatchEvent(type: string, eventProperties: any): boolean

Raises an event of the specified type and with additional properties.

Parameters

  • type: string

    The type (name) of the event.

  • eventProperties: any

    The set of additional properties to be attached to the event object when the event is raised.

Returns

boolean

true if preventDefault was called on the event, otherwise false.

public dispose()

Releases resources held by this SemanticZoom. Call this method when the SemanticZoom is no longer needed. After calling this method, the SemanticZoom becomes unusable.

public forceLayout()

Forces the SemanticZoom to update its layout. Use this function when making the SemanticZoom visible again after its style.display property had been set to "none".

public onzoomchanged(eventInfo: CustomEvent)

Occurs when the control zooms in or out.

Parameters

  • eventInfo: CustomEvent

    An object that contains information about the event. The detail property of this object is true when the control is zoomed out. Otherwise, it's false.

public removeEventListener(eventName: string, eventCallback: Function, useCapture?: boolean)

Unregisters an event handler for the specified event.

Parameters

  • eventName: string

    The name of the event that the event handler is registered for.

  • eventCallback: Function

    The event handler function to remove.

  • useCapture?: boolean optional

    Set to true to remove the capturing phase event handler; set to false to remove the bubbling phase event handler.