Class: TextControls

PhotoEditorSDK.UI~DesktopUI.Controls. TextControls

The Controls for the Text tool.

new PhotoEditorSDK.UI.DesktopUI.Controls.TextControls()

ui/desktop-ui/controls/text/index.js, line 36

Extends

Members

activeIconPathString

The active icon path of this control

canvasControlsComponentReact.Component

The canvas component for these controls

controlsComponentReact.Component

The controls component for these controls

defaultOptionsObject

The default options for this control

Properties:
Name Type Argument Default Description
fonts Array.<Object> <optional>
[]
replaceFonts Boolean <optional>
false
availableVariations Array.<String> <optional>
null

iconPathString

The icon path of this control

identifierString

A unique identifier for these controls

requiredOperationsArray

The operations required for this control to work properly

switchToDefaultControlsOnRemovalBoolean

If true, the editor will switch to the default controls when any of the updatableOperations is removed.

updatableOperationsArray.<String>

Operations which will trigger UI updates on this controls.

Methods

staticPhotoEditorSDK.UI.DesktopUI.Controls.TextControls.clickAtPosition(clickPosition, editor){Object}

ui/desktop-ui/controls/text/index.js, line 321

Checks if this control reacts to a click at the given (relative to canvas) position. If it does, it returns an object with a prepared shared state (e.g. selected sprite) that is passed to this control on creation

Name Type Description
clickPosition PhotoEditorSDK.Math.Vector2
editor PhotoEditorSDK.UI.DesktopUI.Editor
Returns:
Type Description
Object

staticPhotoEditorSDK.UI.DesktopUI.Controls.TextControls.getPreloadAssets(editor){Array.<String>}

ui/desktop-ui/controls/text/index.js, line 340

Returns the assets that should be preloaded for this control

Name Type Description
editor PhotoEditorSDK.UI.DesktopUI.Editor
Returns:
Type Description
Array.<String>

staticPhotoEditorSDK.UI.DesktopUI.Controls.TextControls.isEnabled(){Boolean}

ui/desktop-ui/controls/text/index.js, line 352

Checks if this control is enabled

Returns:
Type Description
Boolean

staticPhotoEditorSDK.UI.DesktopUI.Controls.TextControls.mapOperationsToSharedState(operations, initial){Object}

ui/desktop-ui/controls/text/index.js, line 109

Maps the operations state to a shared state object

Name Type Default Description
operations Object
initial Boolean false optional
Returns:
Type Description
Object