|
@@ -17,15 +17,12 @@ export default class ToolBox {
|
|
this.activeTool = null;
|
|
this.activeTool = null;
|
|
this.loadTools(defaultTool);
|
|
this.loadTools(defaultTool);
|
|
this.__onUpdate = null;
|
|
this.__onUpdate = null;
|
|
- //this.selectTool('Select')
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
on(e) { return this.activeTool.on(e) }
|
|
on(e) { return this.activeTool.on(e) }
|
|
|
|
|
|
editNode(View){
|
|
editNode(View){
|
|
- console.log("@@@@@@@ wHTTTATATATA")
|
|
|
|
- console.log(View)
|
|
|
|
return this.activeTool.editViewNode(this.CoreSystem,View);
|
|
return this.activeTool.editViewNode(this.CoreSystem,View);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -38,8 +35,12 @@ export default class ToolBox {
|
|
}
|
|
}
|
|
|
|
|
|
selectTool(key){
|
|
selectTool(key){
|
|
|
|
+
|
|
|
|
+ Object.keys(this.tools).forEach((key) => this.tools[key].active = false)
|
|
|
|
+
|
|
let tool = this.tools[key];
|
|
let tool = this.tools[key];
|
|
this.activeTool = tool;
|
|
this.activeTool = tool;
|
|
|
|
+ tool.active = true;
|
|
this.update()
|
|
this.update()
|
|
}
|
|
}
|
|
|
|
|
|
@@ -66,7 +67,7 @@ export default class ToolBox {
|
|
toolStyle = styles.activeTool;
|
|
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;
|
|
return tools;
|
|
}
|
|
}
|
|
@@ -75,10 +76,8 @@ export default class ToolBox {
|
|
/** Must be remove from here**/
|
|
/** Must be remove from here**/
|
|
const styles = StyleSheet.create({
|
|
const styles = StyleSheet.create({
|
|
tool:{
|
|
tool:{
|
|
- padding: 5
|
|
|
|
},
|
|
},
|
|
activeTool:{
|
|
activeTool:{
|
|
- backgroundColor:'green',
|
|
|
|
- padding: 5
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|