Home Reference Source
import {RenderableHelper} from 'arva-js/utils/view/RenderableHelper.js'
public class | source

RenderableHelper

Constructor Summary

Public Constructor
public

constructor(bindMethod: Function, pipeMethod: Function, outputRenderables: Object | Renderable, sizeResolver: *)

Creates a utility for maintaining proper state of decorated renderables

Member Summary

Public Members
public

Method Summary

Public Methods
public

applyDecoratorFunctionsToRenderable(renderable: *, decorators: *)

public

assignRenderable(renderable: *, renderableName: *)

public

decorateRenderable(renderableName: String)

public
public

getRenderableFlowState(renderableName: string): *

public

getRenderableGroup(The: String): OrderedHashMap

Gets the renderables of a certain group

public

getViewFlowState(flowOptions: {}): *

public

Returns true if there are any flowy renderables.

public

Initialize all animation set by @layout.animate

public

prioritiseDockAfter(renderableName: String, prevRenderableName: String): *

public

prioritiseDockBefore(renderableName: String, nextRenderableName: String): *

Rearranges the order in which docked renderables are parsed for rendering, ensuring that 'renderableName' is processed before 'nextRenderableName'.

public

removeRenderable(renderableName: String)

Removes the renderable from the view

public

replaceRenderable(renderableName: *, newRenderable: *)

public

setRenderableFlowState(renderableName: string, stateName: string): *

public

setViewFlowState(stateName: string, flowOptions: *): boolean

Public Constructors

public constructor(bindMethod: Function, pipeMethod: Function, outputRenderables: Object | Renderable, sizeResolver: *) source

Creates a utility for maintaining proper state of decorated renderables

Params:

NameTypeAttributeDescription
bindMethod Function
pipeMethod Function
outputRenderables Object | Renderable
sizeResolver *

Public Members

public waitingAnimations: * source

Public Methods

public applyDecoratorFunctionsToRenderable(renderable: *, decorators: *) source

Params:

NameTypeAttributeDescription
renderable *
decorators *

public assignRenderable(renderable: *, renderableName: *) source

Params:

NameTypeAttributeDescription
renderable *
renderableName *

public decorateRenderable(renderableName: String) source

Params:

NameTypeAttributeDescription
renderableName String

The name of the renderable

...decorators *

The decorators that should be applied

Example:

decorateRenderable('myRenderable',layout.size(100, 100));

Decorates a renderable with other decorators. Using the same decorators as used previously will override the old ones.

public generateWaitQueueFromViewStateStep(step: *): * source

Params:

NameTypeAttributeDescription
step *

Return:

*

public getRenderableFlowState(renderableName: string): * source

Params:

NameTypeAttributeDescription
renderableName string
  • optional
  • default:

Return:

*

public getRenderableGroup(The: String): OrderedHashMap source

Gets the renderables of a certain group

Params:

NameTypeAttributeDescription
The String

name of the group

Return:

OrderedHashMap

A map containing Array-pairs of [renderable, renderableCounterpart] containing the renderables of the specified type.

public getViewFlowState(flowOptions: {}): * source

Params:

NameTypeAttributeDescription
flowOptions {}
  • optional
  • default: {}

Return:

*

public hasFlowyRenderables(): Boolean source

Returns true if there are any flowy renderables.

Return:

Boolean

hasFlowyRenderables

public initializeAnimations() source

Initialize all animation set by @layout.animate

public prioritiseDockAfter(renderableName: String, prevRenderableName: String): * source

Params:

NameTypeAttributeDescription
renderableName String
prevRenderableName String

Return:

*

public prioritiseDockBefore(renderableName: String, nextRenderableName: String): * source

Rearranges the order in which docked renderables are parsed for rendering, ensuring that 'renderableName' is processed before 'nextRenderableName'.

Params:

NameTypeAttributeDescription
renderableName String
nextRenderableName String

Return:

*

public removeRenderable(renderableName: String) source

Removes the renderable from the view

Params:

NameTypeAttributeDescription
renderableName String

The name of the renderable

public replaceRenderable(renderableName: *, newRenderable: *) source

Params:

NameTypeAttributeDescription
renderableName *
newRenderable *

public setRenderableFlowState(renderableName: string, stateName: string): * source

Params:

NameTypeAttributeDescription
renderableName string
  • optional
  • default:
stateName string
  • optional
  • default:

Return:

*

public setViewFlowState(stateName: string, flowOptions: *): boolean source

Params:

NameTypeAttributeDescription
stateName string
  • optional
  • default:
flowOptions *

Return:

boolean