Classes
ImageAsset
Observable is used when you want to be notified when a change occurs. Use on/off methods to add/remove listener. Please note that should you be using the `ne...
Defined in: image-asset/index.d.ts:3
Observable is used when you want to be notified when a change occurs. Use on/off methods to add/remove listener. Please note that should you be using the new Observable({}) constructor, it is obsolete since v3.0, and you have to migrate to the "data/observable" fromObject({}) or the fromObjectRecursive({}) functions.
Extends
Constructors
Constructor
new ImageAsset(asset: any): ImageAsset;Defined in: image-asset/index.d.ts:4
Parameters
| Parameter | Type |
|---|---|
asset | any |
Returns
ImageAsset
Overrides
Properties
android
android: any;Defined in: image-asset/index.d.ts:8
ios
ios: any;Defined in: image-asset/index.d.ts:6
nativeImage
nativeImage: any;Defined in: image-asset/index.d.ts:7
options
options: ImageAssetOptions;Defined in: image-asset/index.d.ts:9
propertyChangeEvent
static propertyChangeEvent: string;Defined in: data/observable/index.ts
String value used when hooking to propertyChange event.
Ns Event
propertyChange
Inherited from
Observable.propertyChangeEvent
Methods
_createPropertyChangeData()
_createPropertyChangeData(
propertyName: string,
value: any,
oldValue?: any): PropertyChangeData;Defined in: data/observable/index.ts
This method is intended to be overriden by inheritors to provide additional implementation.
Parameters
| Parameter | Type |
|---|---|
propertyName | string |
value | any |
oldValue? | any |
Returns
Inherited from
Observable._createPropertyChangeData
_emit()
_emit(eventName: string): void;Defined in: data/observable/index.ts
Parameters
| Parameter | Type |
|---|---|
eventName | string |
Returns
void
Inherited from
addEventListener()
addEventListener(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any,
once?: boolean): void;Defined in: data/observable/index.ts
Adds a listener for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | Name of the event to attach to. |
callback | (data: EventData) => void | A function to be called when some of the specified event(s) is raised. |
thisArg? | any | An optional parameter which when set will be used as "this" in callback method call. |
once? | boolean | An optional parameter which when set will cause the event listener to fire once. |
Returns
void
Inherited from
get()
get(name: string): any;Defined in: data/observable/index.ts
Gets the value of the specified property.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
any
Inherited from
getImageAsync()
getImageAsync(callback: (image: any, error: any) => void): any;Defined in: image-asset/index.d.ts:5
Parameters
| Parameter | Type |
|---|---|
callback | (image: any, error: any) => void |
Returns
any
hasListeners()
hasListeners(eventName: string): boolean;Defined in: data/observable/index.ts
Checks whether a listener is registered for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | The name of the event to check for. |
Returns
boolean
Inherited from
notify()
notify<T>(data: T): void;Defined in: data/observable/index.ts
Notify this Observable instance with some data. This causes all event handlers on the Observable instance to be called, as well as any 'global' event handlers set on the instance's class.
Type Parameters
| Type Parameter |
|---|
T extends Optional<EventData, "object"> |
Parameters
| Parameter | Type | Description |
|---|---|---|
data | T | an object that satisfies the EventData interface, though with an optional 'object' property. If left undefined, the 'object' property will implicitly be set as this Observable instance. |
Returns
void
Inherited from
notifyPropertyChange()
notifyPropertyChange(
name: string,
value: any,
oldValue?: any): void;Defined in: data/observable/index.ts
Notifies all the registered listeners for the property change event.
Parameters
| Parameter | Type |
|---|---|
name | string |
value | any |
oldValue? | any |
Returns
void
Inherited from
Observable.notifyPropertyChange
off()
off(
eventName: string,
callback?: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Removes the listener(s) for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | The name of the event. |
callback? | (data: EventData) => void | An optional specific event listener to remove (if omitted, all event listeners by this name will be removed). |
thisArg? | any | An optional parameter which, when set, will be used to refine search of the correct event listener to be removed. |
Returns
void
Inherited from
on()
on(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Adds a listener for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | The name of the event. |
callback | (data: EventData) => void | The event listener to add. Will be called when an event of the given name is raised. |
thisArg? | any | An optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound. |
Returns
void
Inherited from
once()
once(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Adds a listener for the specified event name, which, once fired, will remove itself.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | The name of the event. |
callback | (data: EventData) => void | The event listener to add. Will be called when an event of the given name is raised. |
thisArg? | any | An optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound. |
Returns
void
Inherited from
removeEventListener()
removeEventListener(
eventName: string,
callback?: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Removes listener(s) for the specified event name.
Parameters
| Parameter | Type | Description |
|---|---|---|
eventName | string | Name of the event to attach to. |
callback? | (data: EventData) => void | An optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed. |
thisArg? | any | An optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener. |
Returns
void
Inherited from
Observable.removeEventListener
set()
set(name: string, value: any): void;Defined in: data/observable/index.ts
Updates the specified property with the provided value.
Parameters
| Parameter | Type |
|---|---|
name | string |
value | any |
Returns
void
Inherited from
setProperty()
setProperty(name: string, value: any): void;Defined in: data/observable/index.ts
Updates the specified property with the provided value and raises a property change event and a specific change event based on the property name.
Parameters
| Parameter | Type |
|---|---|
name | string |
value | any |
Returns
void
Inherited from
addEventListener()
static addEventListener(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any,
once?: boolean): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback | (data: EventData) => void |
thisArg? | any |
once? | boolean |
Returns
void
Deprecated
Inherited from
off()
static off(
eventName: string,
callback?: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback? | (data: EventData) => void |
thisArg? | any |
Returns
void
Deprecated
Inherited from
on()
static on(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any,
once?: boolean): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback | (data: EventData) => void |
thisArg? | any |
once? | boolean |
Returns
void
Deprecated
Inherited from
once()
static once(
eventName: string,
callback: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback | (data: EventData) => void |
thisArg? | any |
Returns
void
Deprecated
Inherited from
removeEventListener()
static removeEventListener(
eventName: string,
callback?: (data: EventData) => void,
thisArg?: any): void;Defined in: data/observable/index.ts
Please avoid using the static event-handling APIs as they will be removed in future.
Parameters
| Parameter | Type |
|---|---|
eventName | string |
callback? | (data: EventData) => void |
thisArg? | any |
Returns
void
Deprecated
Inherited from
- Previous
- Image
- Next
- ImageCache