Commit 1e9a6f3a authored by nerrons's avatar nerrons
Browse files

pd_canvas.js: Fix: edit button doesn't change png properly

parent 749a2535
Pipeline #1615 failed with stage
in 0 seconds
...@@ -898,11 +898,15 @@ var canvas_events = (function() { ...@@ -898,11 +898,15 @@ var canvas_events = (function() {
document.getElementById("k12-edit-button").onclick = function () { document.getElementById("k12-edit-button").onclick = function () {
// first change the button in case pd responds later than the "editmode" check // first change the button in case pd responds later than the "editmode" check
if (document.getElementById("patchsvg").classList.contains("editmode")) { if (document.getElementById("patchsvg").classList.contains("editmode")) {
edit_button.firstElementChild.src = "./extra/K12/icons-large/perform.png"; document.getElementById("k12-edit-button").firstElementChild.src =
edit_button.title = "Start playing the patch you created!" "./extra/K12/icons-large/perform.png";
document.getElementById("k12-edit-button").title =
"Start playing the patch you created!"
} else { } else {
edit_button.firstElementChild.src = "./extra/K12/icons-large/edit.png"; document.getElementById("k12-edit-button").firstElementChild.src =
edit_button.title = "Start building your own patch!" "./extra/K12/icons-large/edit.png";
document.getElementById("k12-edit-button").title =
"Start building your own patch!"
} }
pdgui.pdsend(name, "editmode 0"); pdgui.pdsend(name, "editmode 0");
} }
......
Markdown is supported
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