Interface IStateSurface
A structure holding a state file name and a surface name or a surface index.
Package: @aurigma/design-editor-iframe
Examples
let product = await editor.getProduct();
// Add the third page from the state file.
await product.addSurface({
stateId: "3c040958-bfa8-4a3e-b3af-cff9257e7fa1",
surface: "2"
})
// If an error occurred while adding the page to the product.
.catch(error => console.error("Adding surfaces failed with exception: ", error));
Properties
name
A new name of surface.
Declaration
name?: string;
Property Value
| Type | Description |
|---|---|
| string | A new name of surface. |
stateId
The name of a state file.
Declaration
stateId: string;
Property Value
| Type | Description |
|---|---|
| string | The name of a state file. |
surface
Either name or index of a surface to be added to your product. The surface indexes start from 0. By default, the first page is added to a product.
Declaration
surface?: string;
Property Value
| Type | Description |
|---|---|
| string | Either name or index of a surface to be added to your product. The surface indexes start from |