1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- 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);
-
- 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);
- this.props.CoreSystem.forceUpdate();
- }
-
- }
- }
- display(){
- return(
- <View>
-
- </View>
- )
- }
- }
- BlogFeed.Inputs = {
- }
|