Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SliderComponent

class

SliderComponent

classdesc

Component for comparing pairs of images. Renders a slider for adjusting the curtain of the first image.

Deactivate the sequence, direction and image plane components when activating the slider component to avoid interfering UI elements.

To retrive and use the slider component

example
var viewer = new Mapillary.Viewer(
    "<element-id>",
    "<client-id>",
    "<my key>");

viewer.deactivateComponent("imagePlane");
viewer.deactivateComponent("direction");
viewer.deactivateComponent("sequence");

viewer.activateComponent("slider");

var sliderComponent = viewer.getComponent("slider");

Hierarchy

Index

Properties

Static componentName

componentName: string = "slider"

Accessors

activated

  • get activated(): boolean

defaultConfiguration

name

  • get name(): string
  • Get name.

    description

    The name of the component. Used when interacting with the component through the Viewer's API.

    Returns string

Methods

activate

configure

deactivate

  • deactivate(): void

fire

  • fire(eventType: string, data: any): void
  • Parameters

    • eventType: string
    • data: any

    Returns void

off

  • off(eventType: string, fn: any): void
  • Unsubscribe from an event by its name.

    Parameters

    • eventType: string

      The name of the event to subscribe to.

    • fn: any

      The handler to remove.

    Returns void

on

  • on(eventType: string, fn: any): void
  • Subscribe to an event by its name.

    Parameters

    • eventType: string

      The name of the event to subscribe to.

    • fn: any

      The handler called when the event occurs.

    Returns void

setInitialPosition

  • setInitialPosition(initialPosition: number): void
  • Set the initial position.

    description

    Configures the intial position of the slider. The inital position value will be used when the component is activated.

    Parameters

    • initialPosition: number

      Initial slider position.

    Returns void

setKeys

  • Set the image keys.

    description

    Configures the component to show the image planes for the supplied image keys.

    Parameters

    • keys: ISliderKeys

      Slider keys object specifying the images to be shown in the foreground and the background.

    Returns void

setSliderMode

setSliderVisible

  • setSliderVisible(sliderVisible: boolean): void
  • Set the value controlling if the slider is visible.

    Parameters

    • sliderVisible: boolean

      Value indicating if the slider should be visible or not.

    Returns void

Generated using TypeDoc