Constructors

  • Creates a panel

    Parameters

    • div: any
    • config: object = {}

      A config with the panel settings

    • tracks: array = []

      a list of config objects describing each track

    Returns MLVPanel

Properties

__doc__: Document
_display_order: undefined | any[]
bpPerPixel: any
buffer_level: number
call_update_listener: any
canvas: HTMLCanvasElement
chr: undefined | string
config: object
ctx: null | CanvasRenderingContext2D
drmdListener: undefined | null | (e: any) => void
drmmListener: undefined | null | (e: any) => void
drmuListener: undefined | null | (e: any) => void
end: any
fcListener: undefined | null | (e: any) => void
foListener: undefined | null | (e: any) => void
force_redraw: undefined | boolean
foto: undefined | Timeout
groups: {}
height: any
highlighted_regions: {}
is_dragging: boolean
isMouseDown: boolean
lastMouseX: undefined | number
lastMouseY: undefined | number
legend: any
listeners: {}
loadingIcon: HTMLElement
messageAlert: HTMLDivElement
moto: undefined | Timeout
mouse_over_feature: undefined | null | object
mouseDownX: undefined | number
new_layout: undefined | boolean
retries: number
rsmdListener: undefined | null | (e: any) => void
rsmmListener: undefined | null | (e: any) => void
rsmuListener: undefined | null | (e: any) => void
scale_canvas: undefined | HTMLCanvasElement
scale_ctx: undefined | null | CanvasRenderingContext2D
select_div: undefined | HTMLDivElement
show_scale: undefined | boolean
start: any
start_dragging: undefined | boolean
start_select: undefined | null | number
tile: any
track_order: any[]
trackDialogs: {}
trackDiv: any
trackLabels: {}
tracks: {}
width: any
xOffset: undefined | number
yOffset: number
zmListener: undefined | (e: any) => void

Methods

  • Parameters

    • type: any
    • data: any
    • e: any

    Returns void

  • Parameters

    • e: any

    Returns { x: number; y: number }

  • Adds a listener to the panel

    Parameters

    • id: string

      The id of the handler (can be used to remove the handler) Optional - an id will be assigned (and returned) if not supplied @returns{string} The id of the handler or null if the type did not exist

    • func: Function

      The function to call

    Returns string

  • Removes a listener to the panel

    Parameters

    • config: object

      The config of the track to addTrack

    • index: integer

      Optional, the vertical order of the track

    • no_propagate: any

    Returns void

  • Parameters

    • features: any
    • min: any
    • max: any

    Returns { max: any; min: any }

  • Parameters

    • region: any
    • options: any

    Returns void

  • Parameters

    • bpStart: any
    • bpEnd: any
    • force: any
    • data: any

    Returns Promise<any>

  • Returns the element that houses the panel

    Returns integer

    level - The type of listener - track_empty

  • Gets the feature that was clicked

    Parameters

    • e: any

      Can be any object- all that is required is pageX and PageY

    Returns object

    An object with track - the track config at the event position(or null) and feature - the feature at the postition (or null).

  • Removes the highlighted region from the panel

    Parameters

    • name: string

      The name of the highlighted region that was given when it was created.

    Returns void

  • Removes a listener to the panel

    Parameters

    • id: string

      The id of the handler to remove @returns{boolean} true if the listener was removed, otherwise false

    Returns boolean

  • Removes a listener to the panel

    Parameters

    • track_id: integer
    • not_repaint: any
    • not_propagate: any

    Returns any

  • Repaint the view, using a cached image if available.

    Parameters

    • force: boolean

      If true then a cached image will not be used

    • range_from_tile: boolean

      Redraw the tile

    • Optionalsvg: Function

      if a callback is supplied , then the actual browser will not repaint but a serialises svg string of the browser's contents will be passed to the function

    Returns void

  • sets the extra amount of track to draw each side of the view. A value of 1 will retrieve 1 x the view width each side i.e. 3 x the visible window

    Parameters

    • level: integer

      The type of listener - track_empty

    Returns void

  • Sets the highlighted region

    Parameters

    • location: Object

      An object containing chr, start and end

    • name: string

      The name(id) of the region (used to remove the region)

    • color: string

      The color to give the highlighted region

    Returns void

  • Parameters

    • track_id: any
    • key: any
    • value: any

    Returns void

  • Parameters

    • track_id: any
    • attributes: any

    Returns void

  • Sets the filter function for track

    Parameters

    • track_id: string

      The id of the track

    • func: string

      The color function. It should accept the feature and return the feature color. Use null to go back to default colors

    Returns void

  • Sets the filter function for track.

    Parameters

    • track_id: string

      The id of the track

    • func: string

      The filter function. It should accept the feature and return true to dispaly the feature and false to hide it. Use null to cancel the filter

    Returns void

  • Parameters

    • track_id: any
    • func: any

    Returns void

  • Updated the panel view, if chromosome start and end are supplied it will go to this location. If no parameters are given the panel will be redrawn at the same location e.g after the color, scale or another paramter has been set

    Parameters

    • chr: string
    • start: integer

      of the region to draw

    • end: integer

      of the region to draw

    • no_propagation: any

    Returns void