- modifyCurrentNode: function(attr, value) {
- if(manager.currentNode) {
- if(attr === 'tag') {
- manager.getNodeElement(manager.currentNode).attr('wlxml-'+attr, value);
- }
- else if(attr === 'class') {
- manager.currentNode.setClass(value);
- } else {
- // changing node meta attr
- manager.currentNode.setMetaAttr(attr, value);
- }
- sandbox.publish('contentChanged');
- sandbox.publish('currentNodeChanged', manager.currentNode);
+ modifyCurrentNodeElement: function(attr, value) {
+ var currentNodeElement = canvas.getCurrentNodeElement();
+ if(attr === 'class' || attr === 'tag') {
+ currentNodeElement['setWlxml'+(attr[0].toUpperCase() + attr.substring(1))](value);
+ } else {
+ currentNodeElement.setWlxmlMetaAttr(attr, value);