X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/9db0e3facfdcb376b589ea922215bbdb1a3d1787..c601e8aff30efc0b4fd69765d5671e3ee88c4bf4:/modules/nodePane/nodePane.js?ds=sidebyside diff --git a/modules/nodePane/nodePane.js b/modules/nodePane/nodePane.js index 48dd77a..3a4a0ef 100644 --- a/modules/nodePane/nodePane.js +++ b/modules/nodePane/nodePane.js @@ -26,13 +26,15 @@ return function(sandbox) { }, setNodeElement: function(nodeElement) { view.find('.rng-module-nodePane-tagSelect').val(nodeElement.getWlxmlTag()); - view.find('.rng-module-nodePane-classSelect').val((nodeElement.getWlxmlClass() || '').replace(/\./g, '-')); - //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 escapedClassName = (nodeElement.getWlxmlClass() || '').replace(/\./g, '-') + view.find('.rng-module-nodePane-classSelect').val(escapedClassName); + + var widget = metaWidget.create({attrs:nodeElement.getWlxmlMetaAttrs()}); + widget.on('valueChanged', function(key, value) { + sandbox.publish('nodeElementChange', key, value); + }); + view.find('.metaFields').empty().append(widget.el); } };