diff --git a/draw.js b/draw.js index 9c634d4..77291cd 100644 --- a/draw.js +++ b/draw.js @@ -80,7 +80,6 @@ var DrawingArea = new Lang.Class({ this.settings = Convenience.getSettings(); this.emitter = new DrawingAreaEmitter(); this.monitor = monitor; - this.menu = new DrawingMenu(this); this.helper = helper; this.elements = []; @@ -98,6 +97,12 @@ var DrawingArea = new Lang.Class({ this._loadJson(); }, + get menu() { + if (!this._menu) + this._menu = new DrawingMenu(this); + return this._menu; + }, + _redisplay: function() { // force area to emit 'repaint' this.queue_repaint();