12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import React from 'react';
- import Module from '../../lib/Module';
- import { View , StyleSheet , Text} from 'react-native';
- import Types from '../../lib/Types';
- import BaseContainer from '../BaseContainer/index';
- import ImageComp from '../Image/index';
- import TextComp from '../Text/index';
- import { ViewNode, Node } from '../../lib/systems/ViewSystem';
- /*let base1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer", {width:320,height:209}))
- let base2 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer", {width:320,height:209}))
- let Image1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Image", {width:320,height:209}))
- let Text1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Text", {text:"hi there"}))*/
- export default class BlogFeed extends Module {
- constructor(props){
- super(props)
- this.isTemplate = true;
-
- this.configure();
-
- }
- configure(){
- if(this.props.CoreSystem){
- let CurrentView = this.props.CoreSystem.getCurrentView();
- let node = CurrentView.getNode(this.props.NodeID)
- let children = CurrentView.getChildren(node);
- let base1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer", {width:370,height:209}))
- let base2 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer", {width:370,height:209}))
- let Image1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Image", {width:370,height:209}))
- let Text1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Text", {text:"This is the post Title",color:"rgba(112, 112, 112, 1)",fontSize:17}))
- let subtitle = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Text", {text:"This is the subtitle",color:"rgba(112, 112, 112, 1)",fontSize:14}))
- if(!CurrentView.has(base1)) CurrentView.addViewNode(base1 , node );
- if(!CurrentView.has(base2.id)) CurrentView.addViewNode( base2 ,node);
- if(!CurrentView.has(Image1.id)) CurrentView.addViewNode(Image1,base1)
- if(!CurrentView.has(Text1.id)) {
- CurrentView.addViewNode(Text1 , base2);
-
- }
- if(!CurrentView.has(subtitle.id)) {
- CurrentView.addViewNode(subtitle , base2);
- this.props.CoreSystem.forceUpdate();
- }
-
- }
- }
- display(){
- return(
- <View>
-
- </View>
- )
- }
- }
- BlogFeed.Inputs = {
- }
|