Class Image

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(attributes?: any, options?: any): Model

Parameters

  • attributes?: any optional
  • options?: any optional

Returns

Model

Properties

public attributes: any

public changed: Array<any>

public cid: string

public id: any

public idAttribute: string

public url: any

public urlRoot: any

public validationError: any

Methods

public attr(attrs: any): Cell

Parameters

  • attrs: any

Returns

Cell

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

Parameters

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

Returns

any

public change(): any

Returns

any

public changedAttributes(attributes?: any): Array<any>

Parameters

  • attributes?: any optional

Returns

Array<any>

public clear(options?: Silenceable): any

Parameters

Returns

any

public clone(opt?: any): Model

Parameters

  • opt?: any optional

Returns

Model

public defaults(): any

Default attributes for the model. It can be an object hash or a method returning an object hash. For assigning an object hash, do it like this: this.defaults = { attribute: value, ... }; That works only if you set it in the constructor or the initialize method.

Returns

any

public destroy(options?: ModelDestroyOptions): any

Parameters

Returns

any

public embed(cell: Cell): any

Parameters

Returns

any

public escape(attribute: string): string

Parameters

  • attribute: string

Returns

string

public fetch(options?: ModelFetchOptions): JQueryXHR

Parameters

Returns

JQueryXHR

public get(attributeName: string): any

Parameters

  • attributeName: string

Returns

any

public getEmbeddedCells(): Cell[]

Returns

Cell[]

public has(attribute: string): boolean

Parameters

  • attribute: string

Returns

boolean

public hasChanged(attribute?: string): boolean

Parameters

  • attribute?: string optional

Returns

boolean

public initialize(attributes?: any)

Parameters

  • attributes?: any optional

public invert(): any

Returns

any

public isNew(): boolean

Returns

boolean

public isValid(options?: any): boolean

Parameters

  • options?: any optional

Returns

boolean

public keys(): Array<string>

Returns

Array<string>

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 off(eventName?: string, callback?: Function, context?: any): any

Parameters

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

Returns

any

public omit(keys: Array<string>): any

Parameters

  • keys: Array<string>

Returns

any

public omit(keys?: Array<string>): any

Parameters

  • keys?: Array<string> 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 pairs(): Array<any>

Returns

Array<any>

public parse(response: any, options?: any): any

Parameters

  • response: any
  • options?: any optional

Returns

any

public pick(keys: Array<string>): any

Parameters

  • keys: Array<string>

Returns

any

public pick(keys?: Array<string>): any

Parameters

  • keys?: Array<string> optional

Returns

any

public position(x: number, y: number): Element

Parameters

  • x: number
  • y: number

Returns

Element

public previous(attribute: string): any

Parameters

  • attribute: string

Returns

any

public previousAttributes(): Array<any>

Returns

Array<any>

public remove(options?: any): any

Parameters

  • options?: any optional

Returns

any

public resize(width: number, height: number): Element

Parameters

  • width: number
  • height: number

Returns

Element

public rotate(angle: number, absolute: any): Element

Parameters

  • angle: number
  • absolute: any

Returns

Element

public save(attributes?: any, options?: ModelSaveOptions): any

Parameters

Returns

any

public set(attributeName: string, value: any, options?: ModelSetOptions): Model

Parameters

Returns

Model

public set(obj: any, options?: ModelSetOptions): Model

Parameters

Returns

Model

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

Parameters

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

Returns

any

public sync(arg?: Array<any>): JQueryXHR

Parameters

  • arg?: Array<any> optional

Returns

JQueryXHR

public toBack(): any

Returns

any

public toFront(): any

Returns

any

public toJSON(): any

Returns

any

public translate(tx: number, ty?: number): Element

Parameters

  • tx: number
  • ty?: number optional

Returns

Element

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 unembed(cell: Cell): any

Parameters

Returns

any

public unset(attribute: string, options?: Silenceable): Model

Parameters

Returns

Model

public validate(attributes: any, options?: any): any

Parameters

  • attributes: any
  • options?: any optional

Returns

any

public values(): Array<any>

Returns

Array<any>