Class: ManagedItem

ManagedItem


new ManagedItem(manager, index, tag)

Parameters:
Name Type Description
manager olympe.dc.ranking.Manager
index string
tag string

Extends

Members


<nullable> activeChild :olympe.dc.ranking.Deferred

Type:

activeChildSet :boolean

Type:
  • boolean

added :boolean

Type:
  • boolean

<protected, nullable> child :olympe.dc.ranking.Deferred

Type:
Inherited From:
Overrides:

<protected> depth :number

Type:
  • number
Inherited From:
Overrides:

index :string

Type:
  • string

<protected> manager :olympe.dc.ranking.Manager

Type:
Inherited From:
Overrides:

<protected, nullable> parent :olympe.dc.ranking.Deferred

Type:
Inherited From:
Overrides:

removed :boolean

Type:
  • boolean

tag :string

Type:
  • string

Methods


activate()

Activates the parent deferred and update ranks. That is, ask the ranking manager to compute ranks for the parent depth

Inherited From:
Overrides:
Throws:

If the deferred doesn't have a parent

Type
Error

collectItems(siblings)

Adds the items registered in this deferred to the specified array

Parameters:
Name Type Description
siblings Array.<string>

Array of item's indexes

Inherited From:
Overrides:

getChild(added, tag, index)

Get the child deferred for this item, representing a new depth level in the transformer chain.

The child is common to all the items at the same depth. This method could be refactored to handle separately getting the child and managing the items at the given level.

Parameters:
Name Type Description
added boolean

Whether the item is added or removed

tag string

Item's tag

index string

Item's index

Inherited From:
Overrides:
Returns:
Type
olympe.dc.ranking.Deferred

getDepth()

Gets the depth of this

Inherited From:
Overrides:
Returns:
Type
number

getDescendant(depth)

Gets the grand child at the specified depth, or the deepest available child if the transform chain was stopped by a filter

Parameters:
Name Type Description
depth number

Descendant depth (if depth is 0, this deferred is returned)

Inherited From:
Overrides:
Returns:
Type
olympe.dc.ranking.Deferred

getManager()

Gets the parent ranking manager

Inherited From:
Overrides:
Returns:
Type
olympe.dc.ranking.Manager

setActiveChild(depth)

Parameters:
Name Type Description
depth number