Commit 2d7fa2d7 authored by user's avatar user
Browse files

fixed bug when configuring xlets which don't exist (e.g., autopatching and...

fixed bug when configuring xlets which don't exist (e.g., autopatching and broken objects loaded with connections to others)
parent 71b4349e
......@@ -1956,23 +1956,25 @@ function gui_eraseio(cid, tag) {
function gui_configure_io(cid, tag, is_iemgui, is_signal, width) {
var xlet = get_item(cid, tag);
configure_item(xlet, {
'stroke-width': width,
// fill: 'red'
// fill: filter ? 'orange' : (is_signal ? 'red' : 'green')
});
if (is_iemgui) {
xlet.classList.add('xlet_iemgui');
} else if (is_signal) {
xlet.classList.add('xlet_signal');
} else {
xlet.classList.add('xlet_control');
// We have to check for null here. Empty/broken object boxes
// can have "phantom" xlets as placeholders for connections
// to other objects. This may happen due to:
// * autopatching
// * objects which fail to create when loading a patch
if (xlet !== null) {
configure_item(xlet, {
'stroke-width': width,
});
if (is_iemgui) {
xlet.classList.add('xlet_iemgui');
} else if (is_signal) {
xlet.classList.add('xlet_signal');
} else {
xlet.classList.add('xlet_control');
}
// remove xlet_selected tag
xlet.classList.remove('xlet_selected');
}
// remove xlet_selected tag
xlet.classList.remove('xlet_selected');
// iemgui: black
// sig: red
// control: green
}
function gui_highlight_io(cid, tag) {
......
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