@@ -96,31 +96,6 @@ class BottomTabs extends Component<PropsInt> {
96
96
this . setState ( { value } ) ;
97
97
} ;
98
98
99
- findChildren ( component : ComponentInt , components : ComponentsInt , tree : any ) {
100
- if ( ! component . childrenArray . length ) {
101
- return tree ;
102
- }
103
- const newChildrenArray = [ ] ;
104
-
105
- for ( let i = 0 ; i < component . childrenArray . length ; i ++ ) {
106
- const name = component . childrenArray [ i ] . componentName ;
107
- const newTree : TreeInt = {
108
- name,
109
- attributes : { } ,
110
- children : [ ] ,
111
- } ;
112
- newChildrenArray . push ( newTree ) ;
113
- tree . children = newChildrenArray ;
114
- if ( component . childrenArray [ i ] . childType === 'COMP' ) {
115
- const newFocusComp = components . find (
116
- comp => comp . title === component . childrenArray [ i ] . componentName ,
117
- ) ;
118
- this . findChildren ( newFocusComp , components , newTree ) ;
119
- }
120
- }
121
- return tree ;
122
- }
123
-
124
99
generateComponentTree ( componentId : number , components : ComponentsInt ) {
125
100
const component = components . find ( comp => comp . id === componentId ) ;
126
101
const tree = { name : component . title , attributes : { } , children : [ ] } ;
@@ -141,13 +116,7 @@ class BottomTabs extends Component<PropsInt> {
141
116
142
117
render ( ) {
143
118
const {
144
- classes,
145
- components,
146
- focusComponent,
147
- deleteProp,
148
- addProp,
149
- focusChild,
150
- // rightColumnOpen
119
+ classes, components, focusComponent, deleteProp, addProp, focusChild,
151
120
} = this . props ;
152
121
const { value } = this . state ;
153
122
@@ -156,13 +125,6 @@ class BottomTabs extends Component<PropsInt> {
156
125
const htmlAttribCount = focusComponent . childrenArray . filter ( child => child . childType === 'HTML' )
157
126
. length ;
158
127
159
- // const counters = focusComponent.ch
160
- const tree = {
161
- name : focusComponent . title ,
162
- attributes : { } ,
163
- children : [ ] ,
164
- } ;
165
-
166
128
return (
167
129
< div className = { classes . root } >
168
130
< Tabs
@@ -207,8 +169,7 @@ class BottomTabs extends Component<PropsInt> {
207
169
ref = { node => ( this . treeWrapper = node ) }
208
170
>
209
171
< Tree
210
- data = { [ this . findChildren ( focusComponent , components , tree ) ] }
211
- // data={[this.generateComponentTree(focusComponent.id, components)]}
172
+ data = { [ this . generateComponentTree ( focusComponent . id , components ) ] }
212
173
separation = { { siblings : 0.3 , nonSiblings : 0.3 } }
213
174
transitionDuration = { 0 }
214
175
translate = { this . state . translate }
0 commit comments