removeSurface

Callable

  • Removes the given surface (page) from the product. Returns the product instance where the surface (page) was removed from.

    example
    editor.getProduct()
        .then(function (product) {
            // Remove the current surface.
            product.removeSurface(product.currentSurface)
                .then(function(result) {
                    console.log("Surface removed");
                });
        })
        // If there was an error thrown while removing the surface.
        .catch(function (error) {
            console.error("Removing the surface failed with exception: ", error);
        });
    

    Parameters

    • surface: Surface

      A surface (page) to remove.

    Returns Promise < Product >