diff --git a/lib/widget.js b/lib/widget.js index 8b4d292..ac6c1d6 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -19,7 +19,7 @@ function Node(options) { this.options = options || {}; this.screen = this.screen - || Screen._default + || Screen.global || (function(){throw new Error('No active screen.')})(); this.parent = options.parent || null; // this.screen; this.children = []; @@ -90,8 +90,8 @@ Node.prototype.detach = function(element) { function Screen(options) { var self = this; - if (!Screen._default) { - Screen._default = this; + if (!Screen.global) { + Screen.global = this; } Node.call(this, options); @@ -139,7 +139,7 @@ function Screen(options) { }); } -Screen._default = null; +Screen.global = null; Screen.prototype.__proto__ = Node.prototype;