fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Appending DocumentTextElement
[fnpeditor.git]
/
modules
/
documentCanvas
/
documentCanvas.js
diff --git
a/modules/documentCanvas/documentCanvas.js
b/modules/documentCanvas/documentCanvas.js
index
c47b8bb
..
2fa8722
100644
(file)
--- a/
modules/documentCanvas/documentCanvas.js
+++ b/
modules/documentCanvas/documentCanvas.js
@@
-29,13
+29,17
@@
return function(sandbox) {
},
modifyCurrentNode: function(attr, value) {
if(manager.currentNode) {
},
modifyCurrentNode: function(attr, value) {
if(manager.currentNode) {
- if(
_.contains(['tag', 'class'], attr)
) {
+ if(
attr === 'tag'
) {
manager.getNodeElement(manager.currentNode).attr('wlxml-'+attr, value);
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');
} else {
// changing node meta attr
manager.currentNode.setMetaAttr(attr, value);
}
sandbox.publish('contentChanged');
+ sandbox.publish('currentNodeChanged', manager.currentNode);
}
},
highlightNode: function(canvasNode) {
}
},
highlightNode: function(canvasNode) {