Mercurial > repos > tabletprog
diff editor.js @ 116:9cf3e0b18ecc
Add support for selecting operator expressions in the editor
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 15 Apr 2013 21:14:55 -0700 |
parents | f2b435509301 |
children | 0a66fe3a368a |
line wrap: on
line diff
--- a/editor.js Mon Apr 15 21:13:09 2013 -0700 +++ b/editor.js Mon Apr 15 21:14:55 2013 -0700 @@ -50,14 +50,17 @@ this.domNode = base; base.appendChild(varName); node.appendChild(base); - console.log(this.expression); this.expression.toHTML(base, this); }; op.prototype.toHTML = function(node, up) { this.up = up; + var astNode = this; var base = newEl('span', { - className: 'op' + className: 'op', + onclick: function(event) { + main_module.opClick(this, astNode, event); + } }); this.domNode = base; this.left.toHTML(base, this);