topical media & game development
mobile-graphic-enchant-dev-src-DOMScene.js / js
@scope enchant.CanvasScene.prototype
@type {*}
enchant.DOMScene = enchant.Class.create(enchant.Scene, {
initialize: function() {
enchant.Scene.call(this);
this.addLayer('Dom');
},
_determineEventTarget: function(e) {
var target = this._layers.Dom._determineEventTarget(e);
if (!target) {
target = this;
}
return target;
},
_onchildadded: function(e) {
var child = e.node;
var next = e.next;
child._layer = this._layers.Dom;
this._layers.Dom.insertBefore(child, next);
},
_onenter: function() {
this._layers.Dom._startRendering();
enchant.Core.instance.addEventListener('exitframe', this._dispatchExitframe);
},
_onexit: function() {
this._layers.Dom._stopRendering();
enchant.Core.instance.removeEventListener('exitframe', this._dispatchExitframe);
}
});
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.