Create drawing menu on demand
This commit is contained in:
parent
8671a9e502
commit
7d9bb459b4
7
draw.js
7
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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue