X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/2bb0e6a7d19dc695f82373e568e6959c6b995eca..969f365b3ee6d3cb54f98b23e1ebb97df9f801dd:/modules/nodePane/nodePane.js?ds=inline diff --git a/modules/nodePane/nodePane.js b/modules/nodePane/nodePane.js index fc8284f..cc71d35 100644 --- a/modules/nodePane/nodePane.js +++ b/modules/nodePane/nodePane.js @@ -5,9 +5,11 @@ define([ ], function(templateSrc, $, _) { +'use strict'; + return function(sandbox) { - view = $(_.template(templateSrc)()); + var view = $(_.template(templateSrc)()); view.on('change', 'select', function(e) { var target = $(e.target); @@ -22,14 +24,12 @@ return function(sandbox) { getView: function() { return view; }, - setNode: function(node) { - var tag = node.attr('wlxml-tag'); - var klass = node.attr('wlxml-class'); - view.find('.rng-module-nodePane-tagSelect').val(tag); - view.find('.rng-module-nodePane-classSelect').val(klass); + setNode: function(canvasNode) { + view.find('.rng-module-nodePane-tagSelect').val(canvasNode.getTag()); + view.find('.rng-module-nodePane-classSelect').val(canvasNode.getClass()); } - } + }; -} +}; }); \ No newline at end of file