Surface

A surface, which is a product unit. Each page of a product is a surface.

Methods

Name Description
setMockup

Sets a new surface mockup. Returns new product instance containing the changed surface.

setPrintAreas

Sets new print areas for the surface. Returns new product instance containing the changed surface.

Properties

height

height: number

Surface height.

example
surface = {
    width: 200,
    height: 150,
    printAreas: [{
        bounds: { x:0, y:0, width: 200, height: 150}
    }],
    mockup: {
        down: {
            mockupFile: "envelope", 
            previewMockupFiles: ["coolEnvelope"] 
        }
    }
}

id

id: string

Unique identifier.

mockup

mockup: SurfaceMockup

Surface mockup.

example
surface = {
    width: 200,
    height: 150,
    printAreas: [{
        bounds: { x:0, y:0, width: 200, height: 150}
    }],
    mockup: {
        down: {
            mockupFile: "envelope", 
            previewMockupFiles: ["coolEnvelope"] 
        }
    }
}

name

name: string

Item name.

width

width: number

Surface width.

example
surface = {
    width: 200,
    height: 150,
    printAreas: [{
        bounds: { x:0, y:0, width: 200, height: 150}
    }],
    mockup: {
        down: {
            mockupFile: "envelope", 
            previewMockupFiles: ["coolEnvelope"] 
        }
    }
}