Better representation o an empty text element in familyTree
[fnpeditor.git] / modules / documentCanvas / canvasNode.js
index 5f7efb9..72343a4 100644 (file)
@@ -50,7 +50,8 @@ CanvasNode.prototype.setClass = function(klass) {
     if(klass != this.getClass()) {
         var c = this;
         this.getMetaAttrs().forEach(function(attr) {
     if(klass != this.getClass()) {
         var c = this;
         this.getMetaAttrs().forEach(function(attr) {
-            c.dom.removeAttr('wlxml-meta-' + attr.name);
+            if(!classAttributes.hasMetaAttr(klass, attr.name))
+                c.dom.removeAttr('wlxml-meta-' + attr.name);
         });
         this.dom.attr('wlxml-class', klass);
     }
         });
         this.dom.attr('wlxml-class', klass);
     }