diff editor.js @ 120:d5dc9507d612

Basic support for selecting objects in the editor.
author Mike Pavone <pavone@retrodev.com>
date Wed, 17 Apr 2013 23:56:55 -0700
parents 77f7cd65e121
children 2b25d0ce2946
line wrap: on
line diff
--- a/editor.js	Wed Apr 17 00:23:05 2013 -0700
+++ b/editor.js	Wed Apr 17 23:56:55 2013 -0700
@@ -2,8 +2,12 @@
 
 object.prototype.toHTML = function(node, up) {
 	this.up = up;
+	var astNode = this;
 	var el = newEl('div', {
-		className: 'object'
+		className: 'object',
+		onclick: function(event) {
+			main_module.objectClick(this, astNode, event);
+		}
 	});
 	this.domNode = el;
 	node.appendChild(el);