Interface: IUpdateSurfaceOptions
A structure holding settings to migrate data when replacing surfaces in a product.
Remarks
You can use this structure in updateSurfaces.
Example
let product = await editor.getProduct();
const options = {
replaceAll: true,
definition: "7a6ecf23-1286-4e90-8f18-c7c1c77e3cb0",
surfaces: [0, 1],
newProductSurfaces: [1, 4],
};
product = await product.updateSurfaces(options);
Extends
Extended by
Properties
updateRevertData?
optionalupdateRevertData?:boolean
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.
Inherited from
ISetPrintAreasOptions.updateRevertData
preserveUserChanges?
optionalpreserveUserChanges?:boolean
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.
Inherited from
ISetPrintAreasOptions.preserveUserChanges
preserveSafetyLines?
optionalpreserveSafetyLines?:boolean
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.
Inherited from
ISetPrintAreasOptions.preserveSafetyLines
replaceAll?
optionalreplaceAll?:boolean
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.
Inherited from
ISetPrintAreasOptions.replaceAll
updateSurfaceSize?
optionalupdateSurfaceSize?:boolean
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.
Inherited from
ISetPrintAreasOptions.updateSurfaceSize
surfaces?
optionalsurfaces?:number[]
An array of surfaces in the current product to be removed.
newProductSurfaces?
optionalnewProductSurfaces?:number[]
An array of surfaces in the new product to be inserted.
updateBehavior?
optionalupdateBehavior?:UpdateSurfaceBehavior
Defines how new surfaces will replace existing surfaces in the product. If changeSurfaceLength, removes all pages in the product and replaces them with pages of the new product.