refactor: Add removeMouseLines
This commit is contained in:
parent
26a3f07534
commit
813c756727
@ -629,7 +629,7 @@ export default function Roof2() {
|
|||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Button className="m-1 p-2" onClick={saveImage}>
|
<Button className="m-1 p-2" onClick={() => saveImage('title')}>
|
||||||
저장
|
저장
|
||||||
</Button>
|
</Button>
|
||||||
{/*<Button className="m-1 p-2" onClick={rotateShape}>
|
{/*<Button className="m-1 p-2" onClick={rotateShape}>
|
||||||
|
|||||||
@ -498,6 +498,7 @@ export function useCanvas(id) {
|
|||||||
* @param {string} title - 저장할 이미지 이름
|
* @param {string} title - 저장할 이미지 이름
|
||||||
*/
|
*/
|
||||||
const saveImage = async (title = 'canvas') => {
|
const saveImage = async (title = 'canvas') => {
|
||||||
|
removeMouseLines()
|
||||||
await writeImage(title, canvas?.toDataURL('image/png').replace('data:image/png;base64,', ''))
|
await writeImage(title, canvas?.toDataURL('image/png').replace('data:image/png;base64,', ''))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log('success', res)
|
console.log('success', res)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user