@@ -51,14 +51,8 @@ class Tree {
51
51
52
52
isExpanded : boolean ;
53
53
54
- atomsComponents : any ;
55
-
56
- atomSelectors : any ;
57
-
58
54
rtid : any ;
59
55
60
- recoilDomNode : any ;
61
-
62
56
route : { } ;
63
57
64
58
// Duplicate names: add a unique number ID
@@ -69,15 +63,14 @@ class Tree {
69
63
// If not, create the new component and also a new key: value pair in 'componentNames' with the component's name as the key and 0 as its value
70
64
// EXAMPLE OF COMPONENTNAMES OBJECT: {editableInput: 1, Provider: 0, etc}
71
65
72
- constructor ( state : string | { } , name = 'nameless' , componentData : { } = { } , rtid : any = null , recoilDomNode : any = null , string : any = null ) {
66
+ constructor ( state : string | { } , name = 'nameless' , componentData : { } = { } , rtid : any = null , string : any = null ) {
73
67
this . state = state === 'root' ? 'root' : serializeState ( state ) ;
74
68
this . name = name ;
75
69
this . componentData = componentData ? { ...JSON . parse ( JSON . stringify ( componentData ) ) } : { } ;
76
70
this . children = [ ] ;
77
71
this . parent = null ; // ref to parent so we can add siblings
78
72
this . isExpanded = true ;
79
73
this . rtid = rtid ;
80
- this . recoilDomNode = recoilDomNode ;
81
74
}
82
75
83
76
// Returns a unique name ready to be used
@@ -98,17 +91,17 @@ class Tree {
98
91
return name ;
99
92
}
100
93
101
- addChild ( state : string | { } , name : string , componentData : { } , rtid : any , recoilDomNode : any ) : Tree {
94
+ addChild ( state : string | { } , name : string , componentData : { } , rtid : any ) : Tree {
102
95
const uniqueName = this . checkForDuplicates ( name ) ;
103
- const newChild : Tree = new Tree ( state , uniqueName , componentData , rtid , recoilDomNode ) ;
96
+ const newChild : Tree = new Tree ( state , uniqueName , componentData , rtid ) ;
104
97
newChild . parent = this ;
105
98
this . children . push ( newChild ) ;
106
99
return newChild ;
107
100
}
108
101
109
- addSibling ( state : string | { } , name : string , componentData : { } , rtid : any , recoilDomNode : any ) : Tree {
102
+ addSibling ( state : string | { } , name : string , componentData : { } , rtid : any ) : Tree {
110
103
const uniqueName = this . checkForDuplicates ( name ) ;
111
- const newSibling : Tree = new Tree ( state , uniqueName , componentData , rtid , recoilDomNode ) ;
104
+ const newSibling : Tree = new Tree ( state , uniqueName , componentData , rtid ) ;
112
105
newSibling . parent = this . parent ;
113
106
this . parent . children . push ( newSibling ) ;
114
107
return newSibling ;
@@ -127,7 +120,7 @@ class Tree {
127
120
circularComponentTable . clear ( ) ;
128
121
}
129
122
// creates copy of present node
130
- let copy : Tree = new Tree ( this . state , this . name , this . componentData , this . rtid , this . recoilDomNode ) ;
123
+ let copy : Tree = new Tree ( this . state , this . name , this . componentData , this . rtid ) ;
131
124
delete copy . parent ;
132
125
circularComponentTable . add ( this ) ;
133
126
copy = scrubUnserializableMembers ( copy ) ;
0 commit comments