|
@@ -6,22 +6,47 @@ import Types from '../../lib/Types';
|
|
|
import BaseContainer from '../BaseContainer/index';
|
|
|
import ImageComp from '../Image/index';
|
|
|
import TextComp from '../Text/index';
|
|
|
+
|
|
|
+import ViewNode from '../../lib/systems/ViewSystem';
|
|
|
+
|
|
|
+console.log("WHATTTTT")
|
|
|
+console.log(BaseContainer.ctor)
|
|
|
+
|
|
|
+let base1 = new ViewNode(Math.random(), BaseContainer.ctor, {}, {width:320,height:209} , "Base");
|
|
|
+let base2 = new ViewNode(Math.random(), BaseContainer.ctor, {}, {width:320,height:209} , "Base2");
|
|
|
+let Image1 = new ViewNode(Math.random(), ImageComp.ctor, {}, {width:320,height:209} , "IMg",);
|
|
|
+let Text1 = new ViewNode(Math.random(), TextComp.ctor, "anmee" , {} );
|
|
|
+
|
|
|
export default class BlogFeed extends Module {
|
|
|
+
|
|
|
constructor(props){
|
|
|
super(props)
|
|
|
this.isTemplate = true;
|
|
|
- console.log("@@@@@@here i am ")
|
|
|
- console.log(this.props.node)
|
|
|
+
|
|
|
+ this.configure();
|
|
|
+
|
|
|
}
|
|
|
- render(){
|
|
|
+
|
|
|
+
|
|
|
+ configure(){
|
|
|
+ if(this.props.CoreSystem){
|
|
|
+ let View = this.props.CoreSystem.getCurrentView();
|
|
|
+ let node = View.getNode(this.props.NodeID)
|
|
|
+ if(!View.has(base1)) {
|
|
|
+ View.addViewNode(base1 , node )
|
|
|
+ };
|
|
|
+ if(!View.has(base2.id)) View.addViewNode( base2 ,node);
|
|
|
+ if(!View.has(Image1.id)) View.addViewNode(Image1,base1)
|
|
|
+
|
|
|
+ if(!View.has(Text1.id)) View.addViewNode(Text1 , base2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ display(){
|
|
|
return(
|
|
|
<View>
|
|
|
- <BaseContainer width = {375} height = {209}>
|
|
|
- <ImageComp width = {375} height = {209}/>
|
|
|
- </BaseContainer>
|
|
|
- <BaseContainer width = {327} height = {255}>
|
|
|
- <TextComp />
|
|
|
- </BaseContainer>
|
|
|
+
|
|
|
+
|
|
|
</View>
|
|
|
)
|
|
|
}
|