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]