cykod / Quintus

HTML5 Game Engine
http://html5quintus.com
GNU General Public License v2.0
1.41k stars 401 forks source link

Step function for UI.HTMLElement throws and error #149

Open gratner opened 9 years ago

gratner commented 9 years ago

Currently, when the UI.HTMLElement is created _super is undefined. This causes the step function of UI.HTMLElement to throw. I'm guessing that UI.IFrame has the same issue. I might be doing something wrong, but the only way I was able to get around it, is to set the step function to noop

 Q.UI.HTMLElement.extend("Elem", {
                init: function (p) {
                    this._super({
                        html: "Hello!"
                    });
                },
                step: function (p) {} // 
            });

this.stage.insert(new Q.Elem());
vaibhavgeek commented 8 years ago

The HTMLElement added this way does not become a part of canvas. If the HTMLElement is to behave as a sprite it should be inside the canvas no?