kopia lustrzana https://github.com/Tldraw/Tldraw
fix pasting svg from clipboard (#884)
rodzic
7fce946428
commit
c527e0547b
|
@ -1765,9 +1765,8 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
|||
paste = async (point?: number[], e?: ClipboardEvent) => {
|
||||
if (this.readOnly) return
|
||||
|
||||
const shapesToCreate: TDShape[] = []
|
||||
|
||||
const filesToPaste: File[] = []
|
||||
const shapesToCreate: TDShape[] = []
|
||||
|
||||
let clipboardData: any
|
||||
|
||||
|
@ -1855,11 +1854,10 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
|||
}
|
||||
case 'text/plain': {
|
||||
if (str.startsWith('<svg')) {
|
||||
getSvgFromText(str)
|
||||
await getSvgFromText(str)
|
||||
} else {
|
||||
getShapeFromText(str)
|
||||
}
|
||||
// return
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue