Skip to content

Commit

Permalink
fix eye icon on load instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelpiano committed Dec 6, 2019
1 parent fdc722e commit a8bbba4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/interface/TreeWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ export default class TreeWidget extends React.Component {
<div> {rowInfo.node.description} </div>
</div>)}>
<div
className={(rowInfo.node.instanceId === this.state.nodeSelected.instanceId)
className={(this.state.nodeSelected !== undefined && rowInfo.node.instanceId === this.state.nodeSelected.instanceId)
? "nodeFound nodeSelected"
: "nodeSelected"}
onClick={ e => {
Expand Down Expand Up @@ -462,6 +462,7 @@ export default class TreeWidget extends React.Component {
componentDidMount () {
var that = this;
document.addEventListener('mousedown', this.monitorMouseClick, false);

GEPPETTO.on(GEPPETTO.Events.Select, function (instance) {
that.updateTree(instance);
});
Expand All @@ -471,6 +472,10 @@ export default class TreeWidget extends React.Component {
that.setState({ nodeSelected: undefined });
}
});

GEPPETTO.on(GEPPETTO.Events.Instances_created, function () {
that.setState({ displayColorPicker: false });
});
}

render () {
Expand Down

0 comments on commit a8bbba4

Please sign in to comment.