fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't serialize wlxml meta attribute if it's empty
[fnpeditor.git]
/
modules
/
documentCanvas
/
classAttributes.js
diff --git
a/modules/documentCanvas/classAttributes.js
b/modules/documentCanvas/classAttributes.js
index
fe7409a
..
06c9485
100644
(file)
--- a/
modules/documentCanvas/classAttributes.js
+++ b/
modules/documentCanvas/classAttributes.js
@@
-13,10
+13,10
@@
var hasMetaAttr = function(klass, attrName, dict) {
if(!klass)
return false;
if(!klass)
return false;
- var parts = klass.split('
-
');
+ var parts = klass.split('
.
');
var partialClass = '';
for(var i = 0; i < parts.length; i++) {
var partialClass = '';
for(var i = 0; i < parts.length; i++) {
- partialClass += (partialClass === '' ? '' : '
-
') + parts[i];
+ partialClass += (partialClass === '' ? '' : '
.
') + parts[i];
if(dict[partialClass] && dict[partialClass][attrName])
return true;
}
if(dict[partialClass] && dict[partialClass][attrName])
return true;
}
@@
-28,7
+28,7
@@
var getMetaAttrsList = function(klass, dict) {
klass = klass || '';
var toret = {own: [], inheritedFrom: {}, all: []};
klass = klass || '';
var toret = {own: [], inheritedFrom: {}, all: []};
- var parts = klass.split('
-
');
+ var parts = klass.split('
.
');
var partialClass = '';
var generate = function(klass) {
var partialClass = '';
var generate = function(klass) {
@@
-46,7
+46,7
@@
var getMetaAttrsList = function(klass, dict) {
toret.own = generate(klass);
for(var i = 0; i < parts.length; i++) {
toret.own = generate(klass);
for(var i = 0; i < parts.length; i++) {
- partialClass += (partialClass === '' ? '' : '
-
') + parts[i];
+ partialClass += (partialClass === '' ? '' : '
.
') + parts[i];
var list = generate(partialClass);
if(list.length > 0) {
toret.inheritedFrom[partialClass] = generate(partialClass);
var list = generate(partialClass);
if(list.length > 0) {
toret.inheritedFrom[partialClass] = generate(partialClass);