|
@@ -49,16 +49,12 @@ export default class SideBar{
|
|
let CurrentView = this.CoreSystem.getCurrentView();
|
|
let CurrentView = this.CoreSystem.getCurrentView();
|
|
let Routing = this.CoreSystem.Routing;
|
|
let Routing = this.CoreSystem.Routing;
|
|
let Structure = {};
|
|
let Structure = {};
|
|
- if(tool){
|
|
|
|
- if(tool.selectedNode && tool.selectedNode.isCol)
|
|
|
|
- {
|
|
|
|
|
|
+ if (tool) {
|
|
|
|
+ if (tool.selectedNode && tool.selectedNode.isCol && CurrentView.has(tool.selectedNode)) {
|
|
this.ColNode = tool.selectedNode;
|
|
this.ColNode = tool.selectedNode;
|
|
this.RowNode = CurrentView.getParent(this.ColNode);
|
|
this.RowNode = CurrentView.getParent(this.ColNode);
|
|
- //console.log("ROWNODE" , this.RowNode);
|
|
|
|
- //console.log("ColNode" , this.ColNode);
|
|
|
|
- //console.log("viewNode" , this.viewNode);
|
|
|
|
|
|
|
|
- if(tool.selectedNode.content && tool.selectedNode.content.value){
|
|
|
|
|
|
+ if(tool.selectedNode.content && tool.selectedNode.content.value) {
|
|
this.viewNode = tool.selectedNode.content;
|
|
this.viewNode = tool.selectedNode.content;
|
|
Structure = ModuleSystem.fromViewNode(this.viewNode).Inputs;
|
|
Structure = ModuleSystem.fromViewNode(this.viewNode).Inputs;
|
|
}
|
|
}
|
|
@@ -67,9 +63,6 @@ export default class SideBar{
|
|
console.log("###################")
|
|
console.log("###################")
|
|
console.log(Structure)
|
|
console.log(Structure)
|
|
let data = Object.keys(Structure || {}).map((key) => {
|
|
let data = Object.keys(Structure || {}).map((key) => {
|
|
- console.log("@@@@@@ from here")
|
|
|
|
- console.log(Structure[key])
|
|
|
|
-
|
|
|
|
switch(Structure[key].constructor.name){
|
|
switch(Structure[key].constructor.name){
|
|
case 'Integer':
|
|
case 'Integer':
|
|
return <Numbers title={key} number={2}
|
|
return <Numbers title={key} number={2}
|
|
@@ -83,7 +76,6 @@ export default class SideBar{
|
|
}
|
|
}
|
|
|
|
|
|
})
|
|
})
|
|
- console.log("ROW NODE DATA DATA" , this.RowNode , this.RowNode && CurrentView.getColumns(this.RowNode).length);
|
|
|
|
return (
|
|
return (
|
|
<View>
|
|
<View>
|
|
<Text style={SideBarStyle.title}>Side Bar</Text>
|
|
<Text style={SideBarStyle.title}>Side Bar</Text>
|
|
@@ -94,7 +86,6 @@ export default class SideBar{
|
|
<TextEditor title="Inner Columns"
|
|
<TextEditor title="Inner Columns"
|
|
text={this.RowNode && CurrentView.getColumns(this.RowNode).length +''}
|
|
text={this.RowNode && CurrentView.getColumns(this.RowNode).length +''}
|
|
onChange={(cols) => {
|
|
onChange={(cols) => {
|
|
- console.log(cols, "COLS");
|
|
|
|
CurrentView.setColumns(this.RowNode, parseInt(cols))
|
|
CurrentView.setColumns(this.RowNode, parseInt(cols))
|
|
this.forceUpdate();
|
|
this.forceUpdate();
|
|
}}/>
|
|
}}/>
|