Skip to content
Browse files

fix for addChild and removeChild modifications

  • Loading branch information...
1 parent 8f77dfc commit 6c2b2138ec6c9d56169fe391247f23785fc19317 @azakus azakus committed Feb 17, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 Canvas.js
View
10 Canvas.js
@@ -15,6 +15,16 @@ enyo.kind({
rendered: function() {
this.renderChildren();
},
+ /*
+ addChild and removeChild of Control kind assumes children are Controls.
+ CanvasControls are not, so we use UiComponent's version, the superkind of Control
+ */
+ addChild: function() {
+ enyo.UiComponent.prototype.addChild.apply(this, arguments);
+ },
+ removeChild: function() {
+ enyo.UiComponent.prototype.removeChild.apply(this, arguments);
+ },
renderChildren: function(inContext) {
var ctx = inContext;
var canvas = this.hasNode();

0 comments on commit 6c2b213

Please sign in to comment.
Something went wrong with that request. Please try again.