Class ProductPreviewService
Package: @aurigma/design-atoms
Constructors
(constructor)(productContext, designAtomsApiClient, colorPreviewService, service, viewerConfigurationContext, colorParser)
Constructs a new instance of the ProductPreviewService class
Declaration
constructor(productContext: IProductContext, designAtomsApiClient: IDesignAtomsApiClient, colorPreviewService: IListenableColorPreviewService, service: Service, viewerConfigurationContext: IViewerConfigurationContext, colorParser: IColorParser);
Parameters
| Type | Name | Description |
|---|---|---|
| IProductContext | productContext | |
| IDesignAtomsApiClient | designAtomsApiClient | |
| IListenableColorPreviewService | colorPreviewService | |
| Service | service | |
| IViewerConfigurationContext | viewerConfigurationContext | |
| IColorParser | colorParser |
Methods
dispose()
Declaration
dispose(): void;
Returns
| Type | Description |
|---|---|
| void |
getCurrentSurfacePreview(options)
Declaration
getCurrentSurfacePreview(options?: IPreviewOptions): Promise<Blob>;
Parameters
| Type | Name | Description |
|---|---|---|
| IPreviewOptions | options |
Preview rendering options |
Returns
| Type | Description |
|---|---|
| Promise<Blob> | Blob containing the preview image of the current surface |
getSurfacePreview(surfaceIndex, options)
Declaration
getSurfacePreview(surfaceIndex: number, options?: IPreviewOptions): Promise<Blob>;
Parameters
| Type | Name | Description |
|---|---|---|
| number | surfaceIndex |
Index of the surface to preview |
| IPreviewOptions | options |
Preview rendering options |
Returns
| Type | Description |
|---|---|
| Promise<Blob> | Blob containing the preview image of given surface |