Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
displays pipeline title, fixes drag and drop bug on root
Browse files Browse the repository at this point in the history
  • Loading branch information
jghibiki committed Aug 17, 2018
1 parent ae4be9f commit a3e44bc
Show file tree
Hide file tree
Showing 7 changed files with 251 additions and 257 deletions.
19 changes: 16 additions & 3 deletions client/src/Flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,20 @@ class Flow extends Component {

render() {
return (
<div>
<div style={{"textAlign": "center", "background": "#333333", "color": "#fff" }}>
<br/>
<b>
{this.pipeline !== null &&
this.pipeline.name }
</b>
<br/>
<br/>
</div>
<div style={{"height": "100vh", "display": "flex", "background": "#4d4d4d", "textAlign": "initial" }}>
<DiagramWidget className="srd-demo-canvas" diagramEngine={this.engine} {...this.graph_props} />
</div>
</div>
);
}

Expand Down Expand Up @@ -269,9 +280,11 @@ class Flow extends Component {

monitorHash = () => {

if( "#" + this.hash !== window.location.hash || (
this.hash !== this.root_hash && window.location.hash === ""
)){
var atRootHash = this.hash === this.root_hash;
var goToRootHash = window.location.hash === "";
var goToOtherHash = "#" + this.hash !== window.location.hash;

if( (!goToRootHash && goToOtherHash) || (!atRootHash && goToRootHash)){
this.initGraph();
this.renderPipeline();
}
Expand Down
Loading

0 comments on commit a3e44bc

Please sign in to comment.