Hierarchy

Constructors

Properties

$el: any
attributes: Record<string, any>
cid: string
className?: string
collection: Collection<any>
displayed: Promise<WidgetView>

A promise that resolves to the parent view when a child view is displayed.

el: HTMLElement
id?: string
layoutPromise: Promise<any>
luminoWidget: Widget
options: any
stylePromise: Promise<any>
tagName: string

Accessors

Methods

  • Parameters

    • selector: string

    Returns JQuery<HTMLElement>

  • Parameters

    • tagName: string

    Returns void

  • Returns void

  • Parameters

    • eventName: string
    • callback: EventHandler
    • Optional context: any

    Returns ErrorWidgetView

  • Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns ErrorWidgetView

  • Events hash or a method returning the events hash that maps events/selectors to methods on your View. For assigning events as object hash, do it like this: this.events = { "event:selector": callback, ... }; That works only if you set it in the constructor or the initialize method.

    Returns EventsHash

  • Returns {
        msg?: string;
        stack: string;
    }

    • Optional msg?: string
    • stack: string
  • Parameters

    • Optional eventName: null | string
    • Optional callback: null | EventHandler
    • Optional context: any

    Returns ErrorWidgetView

  • Parameters

    • eventName: string
    • callback: EventHandler
    • Optional context: any

    Returns ErrorWidgetView

  • Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns ErrorWidgetView

  • Parameters

    • events: string
    • callback: EventHandler
    • Optional context: any

    Returns ErrorWidgetView

  • Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns ErrorWidgetView

  • For use with views as ES classes. If you define a preinitialize method, it will be invoked when the view is first created, before any instantiation logic is run.

    See

    https://backbonejs.org/#View-preinitialize

    Parameters

    • Optional options: ViewOptions<WidgetModel, HTMLElement>

    Returns void

  • Send a custom msg associated with this view.

    Parameters

    • content: {}
      • Optional buffers: ArrayBuffer[] | ArrayBufferView[]

      Returns void

    • Parameters

      • Optional object: any
      • Optional events: string
      • Optional callback: EventHandler

      Returns ErrorWidgetView

    • Parameters

      • Optional eventName: string
      • Optional callback: EventHandler
      • Optional context: any

      Returns ErrorWidgetView

    • Update the DOM classes applied to an element, default to this.el.

      Parameters

      • old_classes: string[]
      • new_classes: string[]
      • Optional el: HTMLElement

      Returns void

    • Update the DOM classes applied to the widget based on a single trait's value.

      Given a trait value classes map, this function automatically handles applying the appropriate classes to the widget element and removing classes that are no longer valid.

      Parameters

      class_map: dictionary Dictionary of trait values to class lists. Example: { success: ['alert', 'alert-success'], info: ['alert', 'alert-info'], warning: ['alert', 'alert-warning'], danger: ['alert', 'alert-danger'] }; trait_name: string Name of the trait to check the value of. el: optional DOM element handle, defaults to this.el Element that the classes are applied to.

      Parameters

      • class_map: Dict<string[]>
      • trait_name: string
      • Optional el: HTMLElement

      Returns void

    • Do not use, prefer TypeScript's extend functionality.

      Parameters

      • properties: any
      • Optional classProperties: any

      Returns any

    Generated using TypeDoc