diff editor.js @ 118:0a66fe3a368a

Allow selection and navigation of assignment nodes.
author Mike Pavone <pavone@retrodev.com>
date Mon, 15 Apr 2013 21:55:26 -0700
parents 9cf3e0b18ecc
children 77f7cd65e121
line wrap: on
line diff
--- a/editor.js	Mon Apr 15 21:35:37 2013 -0700
+++ b/editor.js	Mon Apr 15 21:55:26 2013 -0700
@@ -41,11 +41,16 @@
 
 assignment.prototype.toHTML = function(node, up) {
 	this.up = up;
+	var astNode = this;
 	var base = newEl('div', {
-		className: 'assignment'
+		className: 'assignment',
+		onclick: function(event) {
+			main_module.assignClick(this, astNode, event);
+		}
 	});
 	var varName = newEl('span', {
-		textContent: this.symbol.name + ' <-'
+		textContent: this.symbol.name,
+		className: 'varname'
 	});
 	this.domNode = base;
 	base.appendChild(varName);