MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / addChild

Method addChild

src/common/overlay/levelRenderer/Group.js:130–153  ·  view source on GitHub ↗
(child)

Source from the content-addressed store, hash-verified

128 */
129 // TODO Type Check
130 addChild(child) {
131 if (child == this) {
132 return;
133 }
134
135 if (child.parent == this) {
136 return;
137 }
138 if (child.parent) {
139 child.parent.removeChild(child);
140 }
141
142 this._children.push(child);
143 child.parent = this;
144
145 if (this._storage && this._storage !== child._storage) {
146
147 this._storage.addToMap(child);
148
149 if (child instanceof Group) {
150 child.addChildrenToStorage(this._storage);
151 }
152 }
153 }
154
155
156 /**

Callers 3

GroupSpec.jsFile · 0.80
StorageSpec.jsFile · 0.80
RenderSpec.jsFile · 0.80

Calls 4

removeChildMethod · 0.80
pushMethod · 0.80
addToMapMethod · 0.80
addChildrenToStorageMethod · 0.80

Tested by

no test coverage detected