Interface IDesignEditorDefinitionInitial
Provides properties to initialize a product in the editor. For details, you can refer to the Initial command.
{
"type": "design-editor",
"name": "editor",
"params": {
"initial": {
"OnBoundsNotificationCb": "{{ #function(arg) console.log(arg) }}",
...
},
"setViewerSettings": {
"zoom": 0.1,
"zoomMode": 'bestFit',
"scrollPosition": {x: 0, y: 0}
}
}
}
Package: ui-framework
Properties
after
The next commands to be executed after this command completes.
Declaration
after?: string | string[]
Property Value
| Type | Description |
|---|---|
| string | string[] | The next commands to be executed after this command completes. |
autoCompile
If false, action will never execute automatically.
Declaration
autoCompile?: boolean
Property Value
| Type | Description |
|---|---|
| boolean | If |
editorConfig
The configuration of the editor.
Declaration
editorConfig?: IConfiguration
Property Value
| Type | Description |
|---|---|
| IConfiguration | The configuration of the editor. |
executeOnce
If true, this command will be executed only once.
You can use it for initial command.
For example, we need to change surface depending on the option value.
We write for initial and for updateSurfaces the same productDefinition with $['option]._
And set executeOnce = true for initial. And initial will be executed only once.
Declaration
executeOnce?: boolean
Property Value
| Type | Description |
|---|---|
| boolean | If |
executeOnlyAfter
Current command will be executed in a next update only after all commands executed in this param.
The same example from executeOnce param.
We need to execute updateSurface on all next updates, exclude the first one.
And we set executeOnlyAfter = ['initial'] for updateSurface command.
Declaration
executeOnlyAfter?: string[]
Property Value
| Type | Description |
|---|---|
| string[] | Current command will be executed in a next update only after all commands executed in this param.
The same example from |
initSurfaceIndex
Initial surface index
Declaration
initSurfaceIndex?: number
Property Value
| Type | Description |
|---|---|
| number | Initial surface index |
lock
Name of widgets that show preloader when command executed.
Declaration
lock?: string[]
Property Value
| Type | Description |
|---|---|
| string[] | Name of widgets that show preloader when command executed. |
maximizeAssetManager
Opens the Asset Manager in the full-window mode.
Declaration
maximizeAssetManager?: boolean
Property Value
| Type | Description |
|---|---|
| boolean | Opens the Asset Manager in the full-window mode. |
message
The message for preloader.
Declaration
message?: string | string[]
Property Value
| Type | Description |
|---|---|
| string | string[] | The message for preloader. |
OnBoundsNotificationCb
A function that is executed after changing the bounds of the printable area.
Declaration
OnBoundsNotificationCb?: (boundsData: IBoundsData) => void | Array<(sender: string, customData: any) => void>
Property Value
| Type | Description |
|---|---|
| (boundsData: IBoundsData) => void | Array<(sender: string, customData: any) => void> | A function that is executed after changing the bounds of the printable area. |
onCustomButtonClicked
A function that is executed after customButton clicked.
Declaration
onCustomButtonClicked?: (sender: string, customData: any) => void | Array<(sender: string, customData: any) => void>
Property Value
| Type | Description |
|---|---|
| (sender: string, customData: any) => void | Array<(sender: string, customData: any) => void> | A function that is executed after customButton clicked. |
onExecuted
Functions that executed after command
Declaration
onExecuted?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | Functions that executed after command |
OnImageDpiChanged
A function that is executed after changing an image item DPI.
Declaration
OnImageDpiChanged?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | A function that is executed after changing an image item DPI. |
onInit
Declaration
onInit?: Function | Array<Function>
Property Value
| Type | Description |
|---|---|
| Function | Array<Function> |
onItemAdded
A function that is executed after adding an item.
Declaration
onItemAdded?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | A function that is executed after adding an item. |
onItemChanged
A function that is executed after changing an item.
Declaration
onItemChanged?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | A function that is executed after changing an item. |
onItemRemoved
A function that is executed after removing an item.
Declaration
onItemRemoved?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | A function that is executed after removing an item. |
onProductRevert
A function that is executed after clicking the Revert Product button.
Declaration
onProductRevert?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | A function that is executed after clicking the |
OnRedoProduct
A function that is executed after redo product.
Declaration
OnRedoProduct?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | A function that is executed after redo product. |
OnUndoProduct
A function that is executed after undo product.
Declaration
OnUndoProduct?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | A function that is executed after undo product. |
productDefinition
PSD/IDML templates to open. For details, see the topic about defining products.
Declaration
productDefinition: IProductDefinition
Property Value
| Type | Description |
|---|---|
| IProductDefinition | PSD/IDML templates to open. For details, see the topic about defining products. |
resourceId
A design identifier of a product variant.
Declaration
resourceId?: string
Property Value
| Type | Description |
|---|---|
| string | A design identifier of a product variant. |
showPreloader
If true, displays the preloader while executing this command.
Declaration
showPreloader?: boolean
Property Value
| Type | Description |
|---|---|
| boolean | If |
timeout
The timeout for switching preloader messages.
Declaration
timeout?: number
Property Value
| Type | Description |
|---|---|
| number | The timeout for switching preloader messages. |
viewerSettings
Canvas zoom properties.
Declaration
viewerSettings?: IDesignEditorDefinitionSetViewerSettings
Property Value
| Type | Description |
|---|---|
| IDesignEditorDefinitionSetViewerSettings | Canvas zoom properties. |