Class Menu

Populates the menu bar on the top and initializes the context menu.

Constructors

Properties

coloredEdgesBox: HTMLInputElement
dayModeBox: HTMLInputElement
separateColoursBox: HTMLInputElement
showPropertyBox: HTMLInputElement

Methods

  • Adds the menu to the graph parent DOM element and sets up the event listeners.

    Returns void

  • Add the menu entries of the options menu. Cannot be done with an entries array because they need an event listener so they have its own function.

    Parameters

    • as: HTMLAnchorElement[]

      an empty array that will be filled with the anchor elements

    Returns void

  • Applies the options selected in the menu tab "Options", for example Combine Match Mode.

    Returns void

  • Returns boolean

    if edges should get different colors by type.

  • Creates and returns the menus for the top menu bar. The format is an array of menu elements. Each menu element is an object with a "label", unique "id" and an "entries" array. entries is an array of arrays of size two. entries[i][0] is either a link as a string (will be opened on another tab) or a function that will be executed. entries[i][1] is a label as a string. entries[i][2] is an i18 id. entries[i][3] is an optional hotkey. *

    Returns MenuElement[]

    the array of menu elements.

  • Restore session-based options from the output of toJSON().

    Parameters

    • json: any

      an option object

    Returns void

  • Save session-based options (not user preferences) to JSON.

    Returns object

  • Returns boolean

    whether subontologies are to be displayed separately.

  • Sets the preferred node label language attribute. Use the values from node.js.

    Parameters

    • lang: string

      the language to set

    Returns void

  • Show all nodes that are connected via close matches to visible nodes.

    Returns void

  • Returns boolean

    if edge labels with the property names should always be shown.

  • Notifies the user of the program version so that errors can be properly reported.

    Returns void

  • Close the dropdown if the user clicks outside of the menu.

    Parameters

    • e: any

      a click event

    Returns void