Memory leak fixes
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
TEXT_FIELD_LAYOUT,
|
||||
PHOTO_FIELD_LAYOUT
|
||||
} from './pdfSettings';
|
||||
import { get } from 'idb-keyval';
|
||||
|
||||
// Conversion factor from millimeters to points (1 inch = 72 points, 1 inch = 25.4 mm)
|
||||
export const MM_TO_PT = 72 / 25.4;
|
||||
@@ -17,6 +18,11 @@ export interface GridLayout {
|
||||
cellHeight: number; // mm
|
||||
}
|
||||
|
||||
// Function to retrieve a blob from IndexedDB
|
||||
export async function getImageBlob(url: string): Promise<Blob | undefined> {
|
||||
return await get(url);
|
||||
}
|
||||
|
||||
// Calculate how many cards can fit on a page.
|
||||
export function calculateGrid(
|
||||
pageWidth: number,
|
||||
|
||||
Reference in New Issue
Block a user