Class: OperationsStack

PhotoEditorSDK. OperationsStack

Holds an array of PhotoEditorSDK.Operation instances and handles their dirtiness

new PhotoEditorSDK.OperationsStack(operations)

sdk/lib/operations-stack.js, line 24

Creates an OperationsStack

Name Type Default Description
operations Array.<PhotoEditorSDK.Operation> [] optional

Methods

clear()

sdk/lib/operations-stack.js, line 44

Clears this operations stack

clone(){PhotoEditorSDK.OperationsStack}

sdk/lib/operations-stack.js, line 195

Returns a cloned instance of this stack

Returns:
Type Description
PhotoEditorSDK.OperationsStack

disableCache()

sdk/lib/operations-stack.js, line 70

Disables the cache on all operations

enableCache()

sdk/lib/operations-stack.js, line 63

Enables the cache on all operations

forEach(iterator){Array}

sdk/lib/operations-stack.js, line 79

Passes Array#forEach

Name Type Description
iterator function
Returns:
Type Description
Array

get(index){PhotoEditorSDK.Operation}

sdk/lib/operations-stack.js, line 204

Returns the operation at the given index

Name Type Description
index Number
Returns:
Type Description
PhotoEditorSDK.Operation

getStack(){Array.<PhotoEditorSDK.Operation>}

sdk/lib/operations-stack.js, line 254

Returns the stack

Returns:
Type Description
Array.<PhotoEditorSDK.Operation>

push(operation)

sdk/lib/operations-stack.js, line 177

Adds the given operation to this stack

Name Type Description
operation PhotoEditorSDK.Operation

remove(operation)

sdk/lib/operations-stack.js, line 226

Removes the given operation

Name Type Description
operation PhotoEditorSDK.Operation

removeAt(index)

sdk/lib/operations-stack.js, line 242

Removes the operation at the given index

Name Type Description
index Number

render(sdk, inputTexture){Promise}

sdk/lib/operations-stack.js, line 91

Renders all operations

Name Type Description
sdk PhotoEditorSDK
inputTexture PhotoEditorSDK.Engine.Texture
Returns:
Type Description
Promise

set(index, operation)

sdk/lib/operations-stack.js, line 213

Sets the operation at the given index to the given one

Name Type Description
index Number
operation PhotoEditorSDK.Operation

setAllToDirty(dimensionsChanged)

sdk/lib/operations-stack.js, line 150

Sets all operations to dirty

Name Type Default Description
dimensionsChanged Boolean false

= falses

unshift(operation)

sdk/lib/operations-stack.js, line 186

Adds the given operation before all existing operations

Name Type Description
operation PhotoEditorSDK.Operation

updateDirtinessForRenderer(renderer)

sdk/lib/operations-stack.js, line 158

Finds the first dirty operation and sets all following operations to dirty

Name Type Description
renderer PhotoEditorSDK.Engine.BaseRenderer

validateSettings(){Promise}

sdk/lib/operations-stack.js, line 138

Validates the settings of all operations

Returns:
Type Description
Promise