Main implementation for OnScreenMenu. This class handles the DOM creation, initialization and event wiring of the core OSM container.

This feature is considered experimental and might be changed in minor release.

Hierarchy

  • OnScreenMenu

Properties

Methods

  • Permanently destroy the component.

    To fully allow Garbage-Collection to free the resources used by the component, make sure to remove any references to the component and its children in application code.

    let chart = ...ChartXY()
    let axisX = chart.getDefaultAxisX()
    // Dispose Chart, and remove all references so that they can be garbage-collected.
    chart.dispose()
    chart = undefined
    axisX = undefined

    Returns

    Object itself for fluent interface

    Returns void

  • Remove event listener from dispose event.

    Returns

    True if the listener is successfully removed and false if it is not found

    Parameters

    • token: Token

      Token of event listener which has to be removed

    Returns boolean

  • Subscribe onDispose event. This event is triggered whenever the On-Screen-menu is disposed.

     // Example usage

    OSM.onDispose(() => {
    console.log('OSM was disposed')
    })

    OSM.dispose()

    Returns

    Token of subscription

    Parameters

    Returns Token

  • Remove the position properties for the div containing osm menu button.

    Returns void

  • Set the position property for the div containing the OSM menu.

    Parameters

    Returns void