Interface ISetPrintAreasOptions
A structure holding settings to migrate data when replacing print areas or surfaces in a product.
Package: @aurigma/design-editor-iframe
Remarks
You can use this structure in setPrintAreas and updateSurfaces.
Examples
let newPrintAreas = [{ designFile: "stamp" }];
let options = {
replaceAll: true,
preserveSafetyLines: false,
updateSurfaceSize: true
};
let product = await editor.getProduct()
product = await product.surfaces[0].setPrintAreas(newPrintAreas, options)
.catch(error => console.error("Failed to set up the print area: ", error));
Properties
preserveSafetyLines
If true, the current safety lines, if any, are restored in new print areas. If false, safety lines from new print areas are applied. The default value is true.
Declaration
preserveSafetyLines?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | If |
preserveUserChanges
If true, the changes made by a user are restored in the new print areas or surfaces if it is possible. Otherwise, all changes made by the user are wiped. The default value is true.
Declaration
preserveUserChanges?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | If |
replaceAll
If true, design elements whose names do not match move to the new print area in a random order according to their types. If false, only design elements with the same names are moved to the new print area. The default value is false.
Declaration
replaceAll?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | If |
updateRevertData
If true, the new print areas or surfaces are stored as ones to restore when the product is reverted. Otherwise, the previously stored ones are restored on product revert. The default value is true.
Declaration
updateRevertData?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | If |
updateSurfaceSize
If true, changes the surface size to match the new print area or surface. If it's false and a mockup is defined, then the surface size remains unchanged. By default, updateSurfaceSize is false, and the surface size changes only if no mockups are specified.
Declaration
updateSurfaceSize?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | If |