Skip to content

Commit 822f766

Browse files
author
huangqi03
committed
fix container createChild params
1 parent e17e313 commit 822f766

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/ContainerMixin.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var ContainerMixin = Object.assign({}, ReactMultiChild.Mixin, {
1616
* @param {number} toIndex Destination index of the element.
1717
* @protected
1818
*/
19-
moveChild: function(child, toIndex) {
19+
moveChild: function(child, afterNode, toIndex, lastIndex) {
2020
var childNode = child._mountImage;
2121
var mostRecentlyPlacedChild = this._mostRecentlyPlacedChild;
2222
if (mostRecentlyPlacedChild == null) {
@@ -48,7 +48,7 @@ var ContainerMixin = Object.assign({}, ReactMultiChild.Mixin, {
4848
* @param {object} childNode ART node to insert.
4949
* @protected
5050
*/
51-
createChild: function(child, childNode) {
51+
createChild: function(child, afterNode, childNode) {
5252
child._mountImage = childNode;
5353
var mostRecentlyPlacedChild = this._mostRecentlyPlacedChild;
5454
if (mostRecentlyPlacedChild == null) {
@@ -122,8 +122,8 @@ var ContainerMixin = Object.assign({}, ReactMultiChild.Mixin, {
122122
}
123123
}
124124
},
125-
getHostNode: function () {},
126-
getNativeNode: function () {}
125+
getHostNode: function () { return this.node },
126+
getNativeNode: function () { return this.node },
127127

128128
});
129129

lib/LayerMixin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ var LayerMixin = {
8989
unmountComponent: function() {
9090
this.destroyEventListeners();
9191
},
92-
getHostNode: function () {},
93-
getNativeNode: function () {}
92+
getHostNode: function () { return this.node },
93+
getNativeNode: function () { return this.node },
9494

9595
};
9696

0 commit comments

Comments
 (0)