clean up old code.

This commit is contained in:
Christopher Jeffrey 2013-08-02 15:17:50 -05:00
parent 5317e14c98
commit b5c7aed3ad
1 changed files with 0 additions and 33 deletions

View File

@ -204,7 +204,6 @@ Node.prototype.emitAncestors = function() {
};
Node.prototype.hasDescendant = function(target) {
// return this.collectDescendants().indexOf(target) !== -1;
return (function find(el) {
for (var i = 0; i < el.children.length; i++) {
if (el.children[i] === target) {
@ -219,7 +218,6 @@ Node.prototype.hasDescendant = function(target) {
};
Node.prototype.hasAncestor = function(target) {
// return this.collectAncestors().indexOf(target) !== -1;
var el = this;
while (el = el.parent) {
if (el === target) return true;
@ -227,18 +225,6 @@ Node.prototype.hasAncestor = function(target) {
return false;
};
Node.prototype.gon = function(type, callback) {
var self = this
, events = this._events || {}
, listeners = (events[type] || []).slice();
return this.on(type, function() {
if (callback.apply(this, arguments) === true) {
self._events[type] = listeners;
}
});
};
Node.prototype.get = function(name, value) {
if (this.data.hasOwnProperty(name)) {
return this.data[name];
@ -441,10 +427,6 @@ Screen.prototype._listenMouse = function(el) {
if (el && !~this.clickable.indexOf(el)) {
el.clickable = true;
// if (el.options.autoFocus !== false && !el._autoFocused) {
// el._autoFocused = true;
// el.on('element click', el.focus.bind(el));
// }
this.clickable.push(el);
}
@ -543,16 +525,6 @@ Screen.prototype._listenKeys = function(el) {
if (el && !~this.keyable.indexOf(el)) {
el.keyable = true;
// Listen for click, but do not enable
// mouse if it's not enabled yet.
// if (el.options.autoFocus !== false && !el._autoFocused) {
// el._autoFocused = true;
// var lm = this._listenedMouse;
// this._listenedMouse = true;
// this._listenMouse(el);
// el.on('element click', el.focus.bind(el));
// this._listenedMouse = lm;
// }
this.keyable.push(el);
}
@ -1302,11 +1274,6 @@ Screen.prototype.attrCode = function(code, cur, def) {
}
}
// Ignore foreground changes for selected items.
// if (el && el.parent._isList && el.parent.items[el.parent.selected] === el) {
// fg = (def >> 9) & 0x1ff;
// }
return (flags << 18) | (fg << 9) | bg;
};