Переглянути джерело

Merge branch 'master' of http://git.onarbooks.com/Klapi/Editor

sxoinas12 5 роки тому
батько
коміт
950c8e7108
4 змінених файлів з 11 додано та 23 видалено
  1. 1 3
      Systems/Gui.js
  2. 3 12
      Systems/SideBar.js
  3. 3 4
      Systems/ToolBox.js
  4. 4 4
      yarn.lock

+ 1 - 3
Systems/Gui.js

@@ -79,16 +79,14 @@ export default class Gui {
       }
   }
 
-
   ToolManagement(e){
-    console.log("whattttt", this)
     if(this.ToolBox.activeTool !== null){
       this.processElement(e)
     }
   }
 
-
   onUpdate(fn){
+    // check toolbox is fine
     this.__onUpdate = fn
   }
 

+ 3 - 12
Systems/SideBar.js

@@ -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();
   						}}/>

+ 3 - 4
Systems/ToolBox.js

@@ -59,16 +59,15 @@ export default class ToolBox {
 		}	
 	}
 	render(){
-			let tools = Object.keys(this.tools).map((key) => {
+		let tools = Object.keys(this.tools).map((key) => {
 			let toolStyle = styles.tool;
 			if(this.activeTool !== null){
-				
 				if(this.activeTool.constructor.name === key){
 					toolStyle = styles.activeTool;
 				}
 			}
-			return(
-			<View onClick={() => this.selectTool(key) }  style={ toolStyle}>{this.tools[key].render()}</View>)});
+			return(<View onClick={() => this.selectTool(key) }  style={toolStyle}>{this.tools[key].render()}</View>)
+		});
 		return tools;
 	}
 

+ 4 - 4
yarn.lock

@@ -1883,9 +1883,9 @@ [email protected]:
   integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
 
 electron-to-chromium@^1.3.191:
-  version "1.3.232"
-  resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.232.tgz#3d812f5082b26b852bd4e98818cd86f10b6ff128"
-  integrity sha512-11F8S49B+8AJy5V540BofxvJ1tWP4wZZ0sOre6KF32evS1YSHXiUB7+TQ/mjrfzg1lirnlA8XDdU8CDcJrBCbA==
+  version "1.3.234"
+  resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.234.tgz#38c7daca042de7c0f9ffe9882e98faf8e1ea2420"
+  integrity sha512-SVXY503NJLFAqBx8VdJaO47G+qUQggHgRjZnyjH9/SZ1w0CJpeBrEssNPk71TeKU8OGHdYjjNNHeJ6v+TJoCBg==
 
 encodeurl@~1.0.2:
   version "1.0.2"
@@ -5585,7 +5585,7 @@ [email protected]:
 
 "trapilib@git+http://git.onarbooks.com/Klapi/TrapiLib.git":
   version "1.0.7"
-  resolved "git+http://git.onarbooks.com/Klapi/TrapiLib.git#683bf9a9e4e3224c4558dfd52b6304b223165c2e"
+  resolved "git+http://git.onarbooks.com/Klapi/TrapiLib.git#d014c941f51eee158490633ca8942c2b3657d47e"
   dependencies:
     expo "^34.0.0-experiment.8"
     prop-types "^15.7.2"