|
@@ -4,6 +4,8 @@ import Library from 'trapilib/dist/lib';
|
|
|
import { TextInput, Image, Button } from 'react-native';
|
|
|
|
|
|
import TextEditor from '../Components/TextEditor';
|
|
|
+import Alignment from '../Components/Alignment';
|
|
|
+
|
|
|
// import Numbers from '../Components/Numbers';
|
|
|
// import ColorEditor from '../Components/ColorEditor';
|
|
|
import TypeHandler from '../Components/TypeHandler.js';
|
|
@@ -64,6 +66,13 @@ export default class SideBar extends BaseSystem {
|
|
|
node.props[key] = text;
|
|
|
this.forceUpdate();
|
|
|
}
|
|
|
+ editNodeStyle(node, style) {
|
|
|
+ node.props = {
|
|
|
+ ...node.props,
|
|
|
+ ...style
|
|
|
+ }
|
|
|
+ this.forceUpdate();
|
|
|
+ }
|
|
|
|
|
|
createHandler(Structure, viewNodeProps, key, onChange) {
|
|
|
let Editor = TypeHandler(Structure);
|
|
@@ -80,6 +89,7 @@ export default class SideBar extends BaseSystem {
|
|
|
editorProps.value = viewNodeProps[key];
|
|
|
break;
|
|
|
case DataTypes.Types.Integer:
|
|
|
+ case DataTypes.Types.Real:
|
|
|
case DataTypes.Types.Bool:
|
|
|
editorProps.number = viewNodeProps[key];
|
|
|
break;
|
|
@@ -144,7 +154,9 @@ export default class SideBar extends BaseSystem {
|
|
|
|
|
|
return (
|
|
|
<View>
|
|
|
- <Text style={SideBarStyle.title}>Side Bar</Text>
|
|
|
+ <Alignment onSelect={(style) => this.editNodeStyle(selectedNode, style)} />
|
|
|
+
|
|
|
+
|
|
|
{StyleData.length > 0 ? (
|
|
|
<View key={Math.random()}>
|
|
|
<select onChange={(event) => {
|