|
@@ -49,16 +49,12 @@ export default class SideBar{
|
|
|
let CurrentView = this.CoreSystem.getCurrentView();
|
|
|
let Routing = this.CoreSystem.Routing;
|
|
|
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.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;
|
|
|
Structure = ModuleSystem.fromViewNode(this.viewNode).Inputs;
|
|
|
}
|
|
@@ -67,9 +63,6 @@ export default class SideBar{
|
|
|
console.log("###################")
|
|
|
console.log(Structure)
|
|
|
let data = Object.keys(Structure || {}).map((key) => {
|
|
|
- console.log("@@@@@@ from here")
|
|
|
- console.log(Structure[key])
|
|
|
-
|
|
|
switch(Structure[key].constructor.name){
|
|
|
case 'Integer':
|
|
|
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 (
|
|
|
<View>
|
|
|
<Text style={SideBarStyle.title}>Side Bar</Text>
|
|
@@ -94,7 +86,6 @@ export default class SideBar{
|
|
|
<TextEditor title="Inner Columns"
|
|
|
text={this.RowNode && CurrentView.getColumns(this.RowNode).length +''}
|
|
|
onChange={(cols) => {
|
|
|
- console.log(cols, "COLS");
|
|
|
CurrentView.setColumns(this.RowNode, parseInt(cols))
|
|
|
this.forceUpdate();
|
|
|
}}/>
|