set screen.index.

This commit is contained in:
Christopher Jeffrey 2015-08-05 04:34:18 -07:00
parent 86fb0582cc
commit 7351c8a716
2 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,7 @@ function Node(options) {
this.children = []; this.children = [];
this.$ = this._ = this.data = {}; this.$ = this._ = this.data = {};
this.uid = Node.uid++; this.uid = Node.uid++;
this.index = -1; this.index = this.index != null ? this.index : -1;
if (this.type !== 'screen') { if (this.type !== 'screen') {
this.detached = true; this.detached = true;

View File

@ -200,6 +200,7 @@ Screen.bind = function(screen) {
if (!~Screen.instances.indexOf(screen)) { if (!~Screen.instances.indexOf(screen)) {
Screen.instances.push(screen); Screen.instances.push(screen);
screen.index = Screen.total;
Screen.total++; Screen.total++;
} }