Class: Operation

PhotoEditorSDK~ Operation

Base class for Operations

new Operation(sdk, options)

sdk/core/operations/operation.js, line 38

Creates an Operation

Name Type Description
sdk PhotoEditorSDK
options Object optional

Extends

Members

staticOperation.identifierString

A unique string that identifies this operation. Can be used to select operations.

Methods

clone(){PhotoEditorSDK.Operation}

sdk/core/operations/operation.js, line 289

Creates a clone of this operation

Returns:
Type Description
PhotoEditorSDK.Operation

dispose()

sdk/core/operations/operation.js, line 307

Disposes this operation

disposeRenderTextures()

sdk/core/operations/operation.js, line 297

Disposes the RenderTexture

getInputDimensions(incorporateZoom){PhotoEditorSDK.Math.Vector2}

sdk/core/operations/operation.js, line 267

Returns the input dimensions for this operation

Name Type Default Description
incorporateZoom Boolean true

= true

Returns:
Type Description
PhotoEditorSDK.Math.Vector2

getNewDimensions(dimensions){PhotoEditorSDK.Math.Vector2}

sdk/core/operations/operation.js, line 162

Returns the dimensions that an image with the given dimensions would have after this operation has been applied

Name Type Description
dimensions PhotoEditorSDK.Math.Vector2
Returns:
Type Description
PhotoEditorSDK.Math.Vector2

getSDK(){PhotoEditorSDK}

sdk/core/operations/operation.js, line 258

Returns the instance of PhotoEditorSDK that this operation belongs to

Returns:
Type Description
PhotoEditorSDK

isDirtyForRenderer(renderer){Boolean}

sdk/core/operations/operation.js, line 228

Checks if this operation is dirty for the given renderer

Name Type Description
renderer PhotoEditorSDK.Engine.BaseRenderer
Returns:
Type Description
Boolean

onAfterExport()

sdk/core/operations/operation.js, line 179

Is called after the SDK finishes exporting

onBeforeExport()

sdk/core/operations/operation.js, line 169

Is called before the SDK begins exporting

abstractrender(inputTexture){Promise}

sdk/core/operations/operation.js, line 70

Applies this operation

Name Type Description
inputTexture PhotoEditorSDK.Engine.RenderTexture
Returns:
Type Description
Promise

reset()

sdk/core/operations/operation.js, line 216

Resets this operation

setDirty(dirty, dimensionsChanged)

sdk/core/operations/operation.js, line 248

Sets the dirtiness for all renderers

Name Type Default Description
dirty Boolean
dimensionsChanged Boolean false

= false

setDirtyForRenderer(dirty, renderer, dimensionsChanged)

sdk/core/operations/operation.js, line 239

Sets the dirtiness for the given renderer

Name Type Default Description
dirty Boolean
renderer PhotoEditorSDK.Engine.BaseRenderer
dimensionsChanged Boolean false

= false

setTemporaryTransformChange(transformChange, inverseTransformChange)

sdk/core/operations/operation.js, line 208

Remembers a temporary transform change and its inverse. These changes are only applied before and after export

Name Type Description
transformChange PhotoEditorSDK.Operations.TransformOperation.TransformChange
inverseTransformChange PhotoEditorSDK.Operations.TransformOperation.TransformChange