From e47516230eb9617ac7a904963c5d0aba4f5a9779 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Thu, 28 Jan 2016 23:46:36 -0500 Subject: [PATCH] gray out GOP when it is opened --- pd/nw/pdgui.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index 8d87eff77..1f78330f8 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -2947,16 +2947,14 @@ exports.popup_action = popup_action; // g.appendChild(b); //} -// refactor-- use a class so this can happen in css +// This sets a GOP subpatch or graph to be "greyed out" when the user +// has opened it to inspect its contents. (I.e., it has its own window.) +// We never actually remove this tag-- instead we just assume that the +// GOP will get erased and redrawn when its time to show the contents +// again. function gui_graph_fill_border(cid, tag) { - var g = get_gobj(cid, tag), - b = g.querySelectorAll(".border"), - i; - for (i = 0; i < b.length; i++) { - configure_item(b[i], { - fill: "gray" - }); - } + var g = get_gobj(cid, tag); + g.classList.add("has_window"); } function gui_graph_deleteborder(cid, tag) { -- GitLab