MCPcopy Create free account
hub / github.com/experdot/pointer / handleSave

Function handleSave

src/renderer/src/components/common/ImageEditor.tsx:632–643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

630 }
631
632 const handleSave = () => {
633 // 先应用所有文本
634 if (textItems.length > 0) {
635 applyTextsToCanvas()
636 }
637
638 const canvas = canvasRef.current
639 if (!canvas) return
640
641 const editedImageUrl = canvas.toDataURL('image/png')
642 onSave(editedImageUrl)
643 }
644
645 const canUndo = currentHistoryIndex > 0
646 const canRedo = currentHistoryIndex < history.length - 1

Callers

nothing calls this directly

Calls 1

applyTextsToCanvasFunction · 0.85

Tested by

no test coverage detected