Created
October 22, 2015 00:22
-
-
Save SimonDanisch/e0a8a2cbc3106ce6c123 to your computer and use it in GitHub Desktop.
drag and drop with glvisualize and fileio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handle_drop(w, files) | |
if !isempty(files) | |
qfiles = map(FileIO.query, files) | |
readable_files = filter(x-> !FileIO.unknown(x), qfiles) | |
visualized_files = map(visualize, map(FileIO.load, readable_files)) | |
files_square = reshape(visualized_files, close_to_square(length(visualized_files))) # turn it into a matrix -> grid | |
view(visualize(files_square), w, method=:perspective) | |
end | |
nothing | |
end | |
const_lift(handle_drop, window, window.inputs[:droppedfiles]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment