IFinishDesignResult Interface

A structure used by Editor.finishProductDesign to store a return value. For details, see the Handling Product Customization topic.

example
// Completing product customization.
editor.finishProductDesign()
    // If product customization is completed successfully.
    .then(function (result) {
        // Get the promise properties.
        hiResOutputUrls = result.hiResOutputUrls;
        proofImageUrls = result.proofImageUrls;
        stateId = result.stateId;
        userId = result.userId;
        returnToEditUrl = result.returnToEditUrl;
        boundsData = result.boundsData;
        userChanges = result.userChanges;
        preflightProblems = result.violationWarningData;
        console.log("User " + userId + " successfully saved state " + stateId);
    })
    // If there was an error thrown when completing product customization.
    .catch(function (error) {
        console.error("Completing product customization failed with exception: ", error);
    });

Properties

boundsData

boundsData: object

Width, height, and upper-left corner coordinates of the bounding rectangle of all items in a group, in points. For details, see the Measuring Products topic.

boundsData declaration

  • currentSurface: object

    Width, height, and upper-left corner coordinates of the bounding rectangle of all items in the current surface, in points.

    • Height: number

      Height of the bounding rectangle.

    • Left: number

      X-coordinate of the bounding rectangle upper-left corner.

    • Top: number

      Y-coordinate of the bounding rectangle upper-left corner.

    • Width: number

      Width of the bounding rectangle.

hiResOutputUrls

hiResOutputUrls: string []

An array of links to the hi-res output.

proofImageUrls

proofImageUrls: string []

An array of permanent links to proof images.

returnToEditUrl

returnToEditUrl: string

A return-to-edit URL. This property is provided for backward compatibility only; it utilizes the old API based on a query string. To learn on how to perform the same functionality using IFrame API, see Loading Product State Into Editor.

stateId

stateId: string

A product state identifier.

userChanges

userChanges: IUserChanges

Returns an object containing all changes made by the user when personalizing the product.

userId

userId: string

The identifier of the user who currently works with the editor.

violationWarningData

violationWarningData: IViolationWarningData []

For items having preflight problems, it provides the item name, item type, corresponding surface name and index, and states of violation warnings. This array allows for detecting products that have violations of the image resolution, safety lines, regions, and text clipping.