Commit 86576e1f authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

protect against superfluous messages sent from guis on graph-on-parent...

protect against superfluous messages sent from guis on graph-on-parent subcanvas that lies outside the bounding box
parent d202d6c9
......@@ -1879,6 +1879,12 @@ function gui_atom_draw_border(cid, tag, width, height) {
function gui_atom_redraw_border(cid, tag, width, height) {
var g = get_gobj(cid, tag),
p;
// Unfortunately Pd will send updates for gui objects that
// lie outside the bounding box of a graph-on-parent subpach.
// We should refrain from sending such messages from Pd, but for
// now this conditional guards against calling a method on null...
if (g) {
p = g.querySelector("polygon");
// When creating a new gatom, the C code sends messages
// to redraw the border before the border exists.
......@@ -1888,6 +1894,7 @@ function gui_atom_redraw_border(cid, tag, width, height) {
points: atom_border_points(width, height)
});
}
}
}
// draw a patch cord
......
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