Commit 04af07bd authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix #164: Dragging a Pd patch into Purr-Data window shows the text of the patch in the window

parent a761341f
......@@ -323,6 +323,14 @@ function add_events() {
document.getElementById("fileDialog").setAttribute("nwworkingdir", pwd);
document.getElementById("fileDialog").setAttribute("accept",
Object.keys(pdgui.pd_filetypes).toString());
// disable drag and drop for the time being
window.addEventListener("dragover", function (evt) {
evt.preventDefault();
}, false);
window.addEventListener("drop", function (evt) {
evt.preventDefault();
}, false);
}
function nw_close_window(window) {
......
......@@ -554,6 +554,14 @@ var canvas_events = (function() {
canvas_find_focus, false
);
// disable drag and drop for the time being
window.addEventListener("dragover", function (evt) {
evt.preventDefault();
}, false);
window.addEventListener("drop", function (evt) {
evt.preventDefault();
}, false);
// Add placeholder text... this all needs to be collected into an
// add_events function similiar to the one in index.js
document.querySelector("#canvas_find_text").placeholder =
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment