Revert "Editor commands API / effects" (#1783)
Reverts tldraw/tldraw#1778. Fuzz testing picked up errors related to deleting pages and undo/redo which may doom this PR. ### Change Type - [x] `major` — Breaking change
This commit is contained in:
parent
e17074a8b3
commit
79fae186e4
139 changed files with 2705 additions and 3745 deletions
|
@ -84,14 +84,12 @@ export function useCanvasEvents() {
|
|||
|
||||
const files = Array.from(e.dataTransfer.files)
|
||||
|
||||
// the drop point should be offset by the position of the editor's container
|
||||
const rect = editor.getContainer().getBoundingClientRect()
|
||||
const point = editor.screenToPage({ x: e.clientX - rect.x, y: e.clientY - rect.y })
|
||||
|
||||
await editor.putExternalContent({
|
||||
type: 'files',
|
||||
files,
|
||||
point,
|
||||
point: editor.screenToPage(e.clientX - rect.x, e.clientY - rect.y),
|
||||
ignoreParent: false,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue