Fix "hide disconnected sources"

This commit is contained in:
futpib 2018-11-18 00:40:10 +03:00
parent cfb7100efd
commit d62955ea76
2 changed files with 5 additions and 2 deletions

View File

@ -555,6 +555,9 @@ class Graph extends React.Component {
const connectedNodeKeys = new Set();
edges.forEach(edge => {
if (edge.type === 'monitorSource') {
return;
}
connectedNodeKeys.add(edge.source);
connectedNodeKeys.add(edge.target);
});

View File

@ -84,8 +84,8 @@ class Preferences extends React.Component {
r.div([
r(Checkbox, {
checked: this.props.preferences.hideDisconnectedSource,
onChange: () => this.props.actions.toggle('hideDisconnectedSource'),
checked: this.props.preferences.hideDisconnectedSources,
onChange: () => this.props.actions.toggle('hideDisconnectedSources'),
}, 'Hide disconnected source'),
]),