add comments

This commit is contained in:
rolux 2012-05-24 19:13:46 +02:00
parent d9fa83ac29
commit b7d9d9ba54

View file

@ -23,7 +23,9 @@ Ox.Focus = (function() {
var index = stack.indexOf(id);
if (index > -1 && index == stack.length - 1) {
stack.length == 1
// empty stack
? stack.pop()
// swap the two last stack items
: stack.splice(stack.length - 2, 0, stack.pop());
Ox.UI.elements[id]
.removeClass('OxFocus')
@ -44,6 +46,7 @@ Ox.Focus = (function() {
Ox.GarbageCollection();
var index = stack.indexOf(id);
if (index == -1 || index < stack.length - 1) {
// move the item to the end of the stack
index > -1 && stack.splice(index, 1);
stack.push(id);
if (stack.length > 1) {