IViolationWarningData Interface

A structure containing details about design elements that have preflight problems.

example
editor.finishProductDesign()

    // If product customization is completed successfully.
    .then(function (result) {
        // Get the promise properties.
        stateId = result.stateId;
        userId = result.userId;
        returnToEditUrl = result.returnToEditUrl;
        preflightProblems = result.violationWarningData;

        console.log("User " + userId + " successfully saved state " + stateId);
        if (preflightProblems.length > 0)
            console.log("The preflight check found some problems.");
    })

    // If there was an error thrown when completing product customization.
    .catch(function (error) {
        console.error("Completing product customization failed with exception: ", error);
    });

Properties

Optional dpiValue

dpiValue: number

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

name

name: string

A name of the design element.

Optional qualityViolationState

qualityViolationState: ViolationState

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

Optional regionViolationState

regionViolationState: ViolationState.Warning | ViolationState.Good

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

Optional safetyLineViolationState

safetyLineViolationState: ViolationState.Warning | ViolationState.Good

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

surfaceIndex

surfaceIndex: number

An index of the surface containing the design element.

surfaceName

surfaceName: string

A name of the surface containing the design element.

Optional textCropViolationState

textCropViolationState: ViolationState.Warning | ViolationState.Good

A state of the text clipping check.

type

type: string

A type of the design element, for example, PlainTextItem or ImageItem.