Commit 2358e4a2 authored by Tamas Kecskes's avatar Tamas Kecskes
Browse files

Add InfoCard to ContainmentCanvas.

parent 536ab8a0
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
"author": "WebGME Dev Team", "author": "WebGME Dev Team",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@material-ui/core": "^3.1.0", "@material-ui/core": "3.1.0",
"@material-ui/icons": "^3.0.1", "@material-ui/icons": "3.0.1",
"blockies": "0.0.2", "blockies": "0.0.2",
"immutability-helper": "^2.8.1", "immutability-helper": "^2.8.1",
"react-color": "^2.14.1", "react-color": "^2.14.1",
......
...@@ -123,6 +123,8 @@ class ContainmentCanvas extends SingleConnectedNode { ...@@ -123,6 +123,8 @@ class ContainmentCanvas extends SingleConnectedNode {
cm = null; cm = null;
em = null; em = null;
item = null;
infoCard = null;
offset = { offset = {
x: 0, x: 0,
...@@ -137,6 +139,9 @@ class ContainmentCanvas extends SingleConnectedNode { ...@@ -137,6 +139,9 @@ class ContainmentCanvas extends SingleConnectedNode {
if (this.props.children !== undefined) { if (this.props.children !== undefined) {
if (this.props.children[0] !== undefined) { if (this.props.children[0] !== undefined) {
this.item = this.props.children[0]; this.item = this.props.children[0];
if (this.props.children[1] !== undefined) {
this.infoCard = this.props.children[1];
}
} else { } else {
this.item = this.props.children; this.item = this.props.children;
} }
...@@ -232,7 +237,7 @@ class ContainmentCanvas extends SingleConnectedNode { ...@@ -232,7 +237,7 @@ class ContainmentCanvas extends SingleConnectedNode {
onMouseMove={this.onMouseMove} onMouseMove={this.onMouseMove}
> >
<BasicConnectingComponent connectionManager={this.cm}/> <BasicConnectingComponent connectionManager={this.cm}/>
{childrenItems.length > 0 ? childrenItems : null} {childrenItems.length > 0 ? childrenItems : this.infoCard}
</div>); </div>);
return connectDropTarget(content); return connectDropTarget(content);
......
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