parent
1fce69b842
commit
7182f14c74
|
@ -46,13 +46,20 @@ class GraphImpl extends React.Component {
|
||||||
settings={SETTINGS}
|
settings={SETTINGS}
|
||||||
style={STYLE}
|
style={STYLE}
|
||||||
onClickNode={(e) => this.props.selectAndLoadInstance(e.data.node.label)}
|
onClickNode={(e) => this.props.selectAndLoadInstance(e.data.node.label)}
|
||||||
onClickStage={(e) => this.props.selectAndLoadInstance(null)}
|
onClickStage={this.onClickStage}
|
||||||
>
|
>
|
||||||
<Filter neighborsOf={this.props.currentInstanceName} />
|
<Filter neighborsOf={this.props.currentInstanceName} />
|
||||||
<ForceAtlas2 iterationsPerRender={1} timeout={6000}/>
|
<ForceAtlas2 iterationsPerRender={1} timeout={6000}/>
|
||||||
</Sigma>
|
</Sigma>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClickStage = (e) => {
|
||||||
|
// Deselect the instance (unless this was a drag event)
|
||||||
|
if (!e.data.captor.isDragging) {
|
||||||
|
this.props.selectAndLoadInstance(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = (state) => ({
|
const mapStateToProps = (state) => ({
|
||||||
|
|
Loading…
Reference in a new issue