Breaking node at beginning/end
[fnpeditor.git] / modules / nodePane / nodePane.js
index 39afbea..a1c2a81 100644 (file)
@@ -14,7 +14,7 @@ return function(sandbox) {
     view.on('change', 'select', function(e) {
         var target = $(e.target);
         var attr = target.attr('class').split('-')[3] === 'tagSelect' ? 'tag' : 'class';
-        sandbox.publish('nodeChanged', attr, target.val());
+        sandbox.publish('nodeElementChange', attr, target.val());
     });
     
     return {
@@ -24,15 +24,15 @@ return function(sandbox) {
         getView: function() {
             return view;
         },
-        setNode: function(canvasNode) {
-            view.find('.rng-module-nodePane-tagSelect').val(canvasNode.getTag());
-            view.find('.rng-module-nodePane-classSelect').val(canvasNode.getClass());
+        setNodeElement: function(nodeElement) {
+            view.find('.rng-module-nodePane-tagSelect').val(nodeElement.getWlxmlTag());
+            view.find('.rng-module-nodePane-classSelect').val(nodeElement.getWlxmlClass());
 
-            var widget = metaWidget.create({attrs:canvasNode.getMetaAttrs()});
-            widget.on('valueChanged', function(key, value) {
-                sandbox.publish('nodeChanged', key, value);
-            });
-            view.find('.metaFields').empty().append(widget.el);
+            //var widget = metaWidget.create({attrs:canvasNode.getMetaAttrs()});
+            //widget.on('valueChanged', function(key, value) {
+            //    sandbox.publish('nodeChanged', key, value);
+            //});
+            //view.find('.metaFields').empty().append(widget.el);
         }
     };