Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Dragging images into a fresh editor

Open Keavon opened this issue 1 year ago • 0 comments

If a user drags an image into the welcome screen (shown when zero documents are open), it should create a new document with an artboard matching the dimensions of the image, and the image placed at 100% scale with the top left corner at the document's origin coordinates. Pasting an image from the clipboard should have the same effect.

Additionally, when the welcome screen is not shown, users should be able to drag an image into the tab bar (the dark horizontal bar occupied by the tabs, including the tabs themselves).

All this should also work for .graphite files.

Related: we'd like to support URLs (similar to https://editor.graphite.rs/#demo/red-dress) where we can open a bitmap or SVG as a new document. Care should be taken to ensure security for potentially malicious files that could be loaded and opened by the editor (someday stealing account info, for example, if the user is logged into Graphite?).

Keavon avatar Apr 17 '23 00:04 Keavon