canvas manager wip - setting cursor at the beginning of a new node
[fnpeditor.git] / modules / nodePane / nodePane.js
index fc8284f..a9ef9e4 100644 (file)
@@ -5,9 +5,11 @@ define([
 \r
 ], function(templateSrc, $, _) {\r
 \r
+'use strict';\r
+\r
 return function(sandbox) {\r
     \r
-    view = $(_.template(templateSrc)());\r
+    var view = $(_.template(templateSrc)());\r
     \r
     view.on('change', 'select', function(e) {\r
         var target = $(e.target);\r
@@ -23,10 +25,8 @@ return function(sandbox) {
             return view;\r
         },\r
         setNode: function(node) {\r
-            var tag = node.attr('wlxml-tag');\r
-            var klass = node.attr('wlxml-class');\r
-            view.find('.rng-module-nodePane-tagSelect').val(tag);\r
-            view.find('.rng-module-nodePane-classSelect').val(klass);\r
+            view.find('.rng-module-nodePane-tagSelect').val(node.tag);\r
+            view.find('.rng-module-nodePane-classSelect').val(node.klass);\r
         }\r
     }\r
     \r