Egret Engine R - v6.0.0
    Preparing search index...

    Hierarchy

    • Event
      • CollectionEvent
    Index
    • 创建一个 CollectionEvent 实例

      Parameters

      • type: string

        事件类型;指示触发事件的动作。

      • Optionalbubbles: boolean

        指定该事件是否可以在显示列表层次结构得到冒泡处理。

      • Optionalcancelable: boolean

        指定是否可以防止与事件相关联的行为。

      • Optionalkind: string

        指示发生的事件类型。此属性值可以是 CollectionEventKind 类中的一个值,也可以是 null,用于指示类型未知。

      • Optionallocation: number

        如果 kind 值为 CollectionEventKind.ADD, CollectionEventKind.REMOVE, CollectionEventKind.REPLACE,或 CollectionEventKind.UPDATE 则此属性为 items 属性中指定的项目集合中零号元素的的索引。

      • OptionaloldLocation: number

        此值指示 items 属性中指定的项目在目标集合中的原位置。

      • Optionalitems: any[]

        受事件影响的项目的列表。

      • OptionaloldItems: any[]

        仅当kind的值为CollectionEventKind.REPLACE时,表示替换前的项目列表。

      Returns CollectionEvent

      Egret 2.4

      eui 1.0

      Web

      zh_CN

    COLLECTION_CHANGE: string = "collectionChange"

    集合类数据发生改变

    Egret 2.4

    eui 1.0

    Web

    zh_CN

    kind: string

    指示发生的事件类型。此属性值可以是 CollectionEventKind 类中的一个值,也可以是 null,用于指示类型未知。

    Egret 2.4

    eui 1.0

    Web

    zh_CN

    items: any[]

    受事件影响的项目的列表。

    Egret 2.4

    eui 1.0

    Web

    zh_CN

    oldItems: any[]

    仅当kind的值为CollectionEventKind.REPLACE时,表示替换前的项目列表。

    Egret 2.4

    eui 1.0

    Web

    zh_CN

    location: number

    如果 kind 值为 CollectionEventKind.ADD、 CollectionEventKind.REMOVE 或 CollectionEventKind.REPLACE, CollectionEventKind.UPDATE 则此属性为 items 属性中指定的项目集合中零号元素的的索引。

    Egret 2.4

    eui 1.0

    Web

    zh_CN

    oldLocation: number

    此属性为 items 属性中指定的项目在目标集合中原来位置的从零开始的索引。

    Egret 2.4

    eui 1.0

    Web

    zh_CN

    • 使用指定的EventDispatcher对象来抛出事件对象。抛出的对象将会缓存在对象池上,供下次循环复用。

      Parameters

      • target: IEventDispatcher

        事件派发目标。

      • eventType: string

        事件类型;指示触发事件的动作。

      • Optionalkind: string

        指示发生的事件类型。此属性值可以是 CollectionEventKind 类中的一个值,也可以是 null,用于指示类型未知。

      • Optionallocation: number

        如果 kind 值为 CollectionEventKind.ADD, CollectionEventKind.REMOVE, CollectionEventKind.REPLACE,或 CollectionEventKind.UPDATE 则此属性为 items 属性中指定的项目集合中零号元素的的索引。

      • OptionaloldLocation: number

        此值指示 items 属性中指定的项目在目标集合中的原位置。

      • Optionalitems: any[]

        受事件影响的项目的列表。

      • OptionaloldItems: any[]

        仅当kind的值为CollectionEventKind.REPLACE时,表示替换前的项目列表。

      Returns boolean

      Egret 2.4

      eui 1.0

      Web

      zh_CN