mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 10:58:12 +08:00
Add drag-and-drop and copy-paste file importing/opening throughout the UI (#2012)
* Add file importing by dragging and dropping throughout the UI * Disable comment-profiling-changes.yaml * Fix CI
This commit is contained in:
@@ -92,11 +92,9 @@ export function createDocumentState(editor: Editor) {
|
||||
});
|
||||
editor.subscriptions.subscribeJsMessage(TriggerDelayedZoomCanvasToFitAll, () => {
|
||||
// TODO: This is horribly hacky
|
||||
setTimeout(() => editor.handle.zoomCanvasToFitAll(), 0);
|
||||
setTimeout(() => editor.handle.zoomCanvasToFitAll(), 1);
|
||||
setTimeout(() => editor.handle.zoomCanvasToFitAll(), 10);
|
||||
setTimeout(() => editor.handle.zoomCanvasToFitAll(), 50);
|
||||
setTimeout(() => editor.handle.zoomCanvasToFitAll(), 100);
|
||||
[0, 1, 10, 50, 100, 200, 300, 400, 500].forEach((delay) => {
|
||||
setTimeout(() => editor.handle.zoomCanvasToFitAll(), delay);
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user