Nikatlas 5 năm trước cách đây
mục cha
commit
88c3df7f0b
3 tập tin đã thay đổi với 18 bổ sung8 xóa
  1. 14 5
      Systems/Environment.js
  2. 3 2
      Systems/Gui.js
  3. 1 1
      yarn.lock

+ 14 - 5
Systems/Environment.js

@@ -4,11 +4,15 @@ import { View, Text, StyleSheet } from 'react-native';
 
 export default class Environment {
 
-	constructor(CS) {
+	constructor(CS, phoneRef) {
+		this.phoneRef = phoneRef;
 		this.CoreSystem = CS;
 	}
 
 	render() {
+		let CurrentView = this.CoreSystem.getCurrentView();
+		let defaultContainer = CurrentView.getDefaultContainer();
+		let Rows = CurrentView.getRows(defaultContainer);
 		return <View style={styles.container}>
           	<View style={styles.row}>
 	          		<Text>Row</Text>
@@ -16,11 +20,16 @@ export default class Environment {
           	</View>
 			<View style={styles.row}>
 	          	<View style={styles.col}>
-	          		<Text>Col</Text>
-	          	</View>
-	          	<View style={[styles.mobileView, styles.col]}>
-	         		{this.CoreSystem.render()}
+	          		<Text>Colasdasdasdasdasd</Text>
+	          		{Rows.map((row) => {
+	          			return <Text>Row : {row.id}</Text>
+	          		})}
 	          	</View>
+	          	<div ref={this.phoneRef}>
+	          		<View style={[styles.mobileView]}>
+	         			{this.CoreSystem.render()}
+	         		</View>
+	          	</div>
 	          	<View style={styles.col}>
 	          		<Text>Col</Text>
 	          	</View>

+ 3 - 2
Systems/Gui.js

@@ -28,7 +28,7 @@ export default class Gui {
     this.phone = this.phoneRef;
     this.toolboxRef = React.createRef();
     this.toolbox = this.toolboxRef;
-    this.Environment = new Environment(this.CoreSystem);
+    this.Environment = new Environment(this.CoreSystem, this.phoneRef);
   
     this.ToolBox = new ToolBox();
     this.MainBar = new MainBar();
@@ -52,13 +52,14 @@ export default class Gui {
   }
 
   onMount() {
+    debugger;
     if(this.phone){
         // thats fine
         this.ToolBoxMouse = new Mouse(this.toolbox.current);
         this.phoneMouse = new Mouse(this.phone.current).droppable();
     }
 
-    if(this.ToolBoxMouse !== undefined && false){
+    if(this.ToolBoxMouse !== undefined){
       this.ToolBoxMouse.listen()
       .on('LeftDown',(e) => this.ToolManagement(e))
 

+ 1 - 1
yarn.lock

@@ -5619,7 +5619,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#2f861c5ece4b3ef3c93e230b53bef63b7528ef53"
+  resolved "git+http://git.onarbooks.com/Klapi/TrapiLib.git#b7a4fb4a6315c275d56278db28f6e2ec9bf6792f"
   dependencies:
     expo "^34.0.0-experiment.8"
     prop-types "^15.7.2"