Class Paper

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(options?: ViewOptions): View

Parameters

Returns

View

Properties

public $el: JQuery

public attributes: any

public cid: string

public className: string

public collection: Collection

public el: any

public id: string

public model: TModel in Backbone.View<TModel extends Model>

public options: IOptions

public tagName: string

Methods

public $(selector: string): JQuery

Parameters

  • selector: string

Returns

JQuery

public $(selector: any): JQuery

Parameters

  • selector: any

Returns

JQuery

public _ensureElement()

public bind(eventName: string, callback: Function, context?: any): any

Parameters

  • eventName: string
  • callback: Function
  • context?: any optional

Returns

any

public bind(eventName: string, callback: Function, context?: any): any

Parameters

  • eventName: string
  • callback: Function
  • context?: any optional

Returns

any

public delegateEvents(events?: any): any

Parameters

  • events?: any optional

Returns

any

public events(): any

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

any

public findView(el: any): CellView

Parameters

  • el: any

Returns

CellView

public findViewByModel(modelOrId: any): CellView

Parameters

  • modelOrId: any

Returns

CellView

public findViewsFromPoint(p: { x: number; y: number; }): CellView[]

Parameters

  • p: { x: number; y: number; }

Returns

CellView[]

public findViewsInArea(r: { x: number; y: number; width: number; height: number; }): CellView[]

Parameters

  • r: { x: number; y: number; width: number; height: number; }

Returns

CellView[]

public listenTo(object: any, events: string, callback: Function): any

Parameters

  • object: any
  • events: string
  • callback: Function

Returns

any

public listenTo(object: any, events: string, callback: Function): any

Parameters

  • object: any
  • events: string
  • callback: Function

Returns

any

public listenToOnce(object: any, events: string, callback: Function): any

Parameters

  • object: any
  • events: string
  • callback: Function

Returns

any

public listenToOnce(object: any, events: string, callback: Function): any

Parameters

  • object: any
  • events: string
  • callback: Function

Returns

any

public make(tagName: string, attrs?: any, opts?: any): View

Parameters

  • tagName: string
  • attrs?: any optional
  • opts?: any optional

Returns

View

public make(tagName: any, attributes?: any, content?: any): any

Parameters

  • tagName: any
  • attributes?: any optional
  • content?: any optional

Returns

any

public off(eventName?: string, callback?: Function, context?: any): any

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: any optional

Returns

any

public off(eventName?: string, callback?: Function, context?: any): any

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: any optional

Returns

any

public on(eventName: string, callback?: Function, context?: any): any

Parameters

  • eventName: string
  • callback?: Function optional
  • context?: any optional

Returns

any

public on(eventName: string, callback?: Function, context?: any): any

Parameters

  • eventName: string
  • callback?: Function optional
  • context?: any optional

Returns

any

public once(events: string, callback: Function, context?: any): any

Parameters

  • events: string
  • callback: Function
  • context?: any optional

Returns

any

public once(events: string, callback: Function, context?: any): any

Parameters

  • events: string
  • callback: Function
  • context?: any optional

Returns

any

public remove(): View

Returns

View

public render(): View

Returns

View

public rotate(deg: number, ox?: number, oy?: number): Paper

Parameters

  • deg: number
  • ox?: number optional
  • oy?: number optional

Returns

Paper

public scale(sx: number, sy?: number, ox?: number, oy?: number): Paper

Parameters

  • sx: number
  • sy?: number optional
  • ox?: number optional
  • oy?: number optional

Returns

Paper

public setDimensions(width: number, height: number): any

Parameters

  • width: number
  • height: number

Returns

any

public setElement(element: HTMLElement, delegate?: boolean): View

Parameters

  • element: HTMLElement
  • delegate?: boolean optional

Returns

View

public setElement(element: JQuery, delegate?: boolean): View

Parameters

  • element: JQuery
  • delegate?: boolean optional

Returns

View

public setElement(element: any): View

Parameters

  • element: any

Returns

View

public snapToGrid(p: any): { x: number; y: number; }

Parameters

  • p: any

Returns

{ x: number; y: number; }

public stopListening(object?: any, events?: string, callback?: Function): any

Parameters

  • object?: any optional
  • events?: string optional
  • callback?: Function optional

Returns

any

public stopListening(object?: any, events?: string, callback?: Function): any

Parameters

  • object?: any optional
  • events?: string optional
  • callback?: Function optional

Returns

any

public trigger(eventName: string, args?: Array<any>): any

Parameters

  • eventName: string
  • args?: Array<any> optional

Returns

any

public trigger(eventName: string, args?: Array<any>): any

Parameters

  • eventName: string
  • args?: Array<any> optional

Returns

any

public unbind(eventName?: string, callback?: Function, context?: any): any

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: any optional

Returns

any

public unbind(eventName?: string, callback?: Function, context?: any): any

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: any optional

Returns

any

public undelegateEvents(): any

Returns

any