Interface: IViolationWarningData
A structure containing details about design elements that have preflight problems.
Example
const renderingResult = await editor
.finishProductDesign()
// If an error occurred while completing product customization.
.catch((error) =>
console.error(
"Completing product customization failed with exception: ",
error,
),
);
// If product customization is completed successfully, get the promise properties.
stateId = renderingResult.stateId;
userId = renderingResult.userId;
returnToEditUrl = renderingResult.returnToEditUrl;
preflightProblems = renderingResult.violationWarningData;
console.log("User " + userId + " successfully saved state " + stateId);
if (preflightProblems.length > 0) {
console.log("The preflight check found some problems.");
}
Properties
type
type:
string
A type of the design element, for example, PlainTextItem or ImageItem.
name
name:
string
A name of the design element.
surfaceName
surfaceName:
string
A name of the surface containing the design element.
surfaceIndex
surfaceIndex:
number
An index of the surface containing the design element.
dpiValue?
optionaldpiValue?:number
A resolution of images or image placeholders that have the Warning or Bad states of the resolution check.
qualityViolationState?
optionalqualityViolationState?:ViolationState
A state of the resolution check of images and image placeholders. This value is either Good, Warning, or Bad.
safetyLineViolationState?
A state of the safety zone violation check. If Warning, the design element goes out of the safety lines.
regionViolationState?
A state of the out-of-region check. If Warning, the design element goes out of the region.
textCropViolationState?
A state of the text clipping check.
fontSizeViolationState?
optionalfontSizeViolationState?:ViolationState
A state of the font size violation check. The state depends on container configuration:
- If font size is smaller than required and configuration has
severity: "warning", will beWarning - If font size is smaller than required and configuration has
severity: "error", will beBad
rasterElementsViolationState?
optionalrasterElementsViolationState?:ViolationState
A state of the raster elements violation check. The state depends on container configuration:
- If element contains raster images and configuration has
severity: "warning", will beWarning - If element contains raster images and configuration has
severity: "error", will beBad
shapeViolationState?
A state of SVG and PDF upload check. Such graphics should appear on the canvas without any losses after uploading in the Shape mode.
bleedViolationState?
A state of the bleed zone violation check. If Warning, the design element goes out of the bleed zone.