From b6a84dedbeaaf59ad09771465c439eaf206401e6 Mon Sep 17 00:00:00 2001 From: enes <enes@nostrdev.com> Date: Fri, 17 Jan 2025 21:07:47 +0100 Subject: [PATCH] refactor(offline): remove unused function --- src/utils/mark.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/utils/mark.ts b/src/utils/mark.ts index f455ea9..1868403 100644 --- a/src/utils/mark.ts +++ b/src/utils/mark.ts @@ -270,21 +270,10 @@ export const getToolboxLabelByMarkType = (markType: MarkType) => { return DEFAULT_TOOLBOX.find((t) => t.identifier === markType)?.label } -export const getOptimizedPathsWithStrokeWidth = (svgString: string) => { - const parser = new DOMParser() - const xmlDoc = parser.parseFromString(svgString, 'image/svg+xml') - const paths = xmlDoc.querySelectorAll('path') - const tuples: string[][] = [] - paths.forEach((path) => { - const d = path.getAttribute('d') ?? '' - const strokeWidth = path.getAttribute('stroke-width') ?? '' - tuples.push([d, strokeWidth]) - }) - - return tuples -} - -export const processMarks = async (marks: Mark[], encryptionKey?: string) => { +export const encryptAndUploadMarks = async ( + marks: Mark[], + encryptionKey?: string +) => { const _marks = [...marks] for (let i = 0; i < _marks.length; i++) { const mark = _marks[i]