Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -323,6 +323,14 @@ function add_events() { ...@@ -323,6 +323,14 @@ function add_events() {
document.getElementById("fileDialog").setAttribute("nwworkingdir", pwd); document.getElementById("fileDialog").setAttribute("nwworkingdir", pwd);
document.getElementById("fileDialog").setAttribute("accept", document.getElementById("fileDialog").setAttribute("accept",
Object.keys(pdgui.pd_filetypes).toString()); 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) { function nw_close_window(window) {
......
...@@ -554,6 +554,14 @@ var canvas_events = (function() { ...@@ -554,6 +554,14 @@ var canvas_events = (function() {
canvas_find_focus, false 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 placeholder text... this all needs to be collected into an
// add_events function similiar to the one in index.js // add_events function similiar to the one in index.js
document.querySelector("#canvas_find_text").placeholder = document.querySelector("#canvas_find_text").placeholder =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment