Skip to main content
⚠️ Archived Version

You are viewing documentation for Design Editor version 7.2, which is no longer actively maintained. For the latest features and updates, please refer to the current version (7.3).

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?

optional dpiValue?: number

A resolution of images or image placeholders that have the Warning or Bad states of the resolution check.


qualityViolationState?

optional qualityViolationState?: ViolationState

A state of the resolution check of images and image placeholders. This value is either Good, Warning, or Bad.


safetyLineViolationState?

optional safetyLineViolationState?: None | Good | Warning

A state of the safety zone violation check. If Warning, the design element goes out of the safety lines.


regionViolationState?

optional regionViolationState?: None | Good | Warning

A state of the out-of-region check. If Warning, the design element goes out of the region.


textCropViolationState?

optional textCropViolationState?: None | Good | Warning

A state of the text clipping check.


fontSizeViolationState?

optional fontSizeViolationState?: 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 be Warning
  • If font size is smaller than required and configuration has severity: "error", will be Bad

rasterElementsViolationState?

optional rasterElementsViolationState?: 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 be Warning
  • If element contains raster images and configuration has severity: "error", will be Bad

shapeViolationState?

optional shapeViolationState?: None | Good | Warning

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?

optional bleedViolationState?: None | Good | Warning

A state of the bleed zone violation check. If Warning, the design element goes out of the bleed zone.

Was this page helpful?