cc-everywhere

Class: DesignViewerContext

Context for Design Viewer module operations

Extends

Implements

Constructors

Constructor

new DesignViewerContext(context): DesignViewerContext;

Parameters

Parameter
Type
context
ActionContext<DesignViewerDesignConfig>

Returns

DesignViewerContext

Overrides

WorkflowContext.constructor

Properties

Property
Modifier
Type
Inherited from
context
public
ActionContext
WorkflowContext.context

Methods

updateDesignAssets()

updateDesignAssets(assets): void;

Updates the design asset(s) rendered in an already-open design viewer, re-rendering it in place with the new Asset(s). Fire-and-forget: the message is dispatched to the agent and this returns immediately.

Parameters

Parameter
Type
Description
assets
Asset[]
The new Asset (or array of assets) to render in the open viewer

Returns

void

Implementation of

IDesignViewerContext.updateDesignAssets

sendCustomMessage()

sendCustomMessage(data): void;

Sends a message to the SDK Agent to update the state of current running workflow.

Parameters

Parameter
Type
Description
data
unknown
incoming data coming from client to update the workflow. Note - Type of data is limited to what postMessage supports.

Returns

void

Inherited from

WorkflowContext.sendCustomMessage