Make NativeMML output only set attributes when they are not the default (just like toMathML).
This commit is contained in:
parent
7ec37f65f0
commit
814045a141
|
@ -518,8 +518,10 @@
|
||||||
skip = MML.skipAttributes, copy = MML.copyAttributes;
|
skip = MML.skipAttributes, copy = MML.copyAttributes;
|
||||||
if (!this.attrNames) {
|
if (!this.attrNames) {
|
||||||
for (var id in defaults) {if (!skip[id] && !copy[id] && defaults.hasOwnProperty(id)) {
|
for (var id in defaults) {if (!skip[id] && !copy[id] && defaults.hasOwnProperty(id)) {
|
||||||
if (this[id] != null && this[id] !== defaults[id])
|
if (this[id] != null && this[id] !== defaults[id]) {
|
||||||
tag.setAttribute(id,this.NativeMMLattribute(this[id]));
|
if (this.Get(id,null,1) !== this[id])
|
||||||
|
tag.setAttribute(id,this.NativeMMLattribute(this[id]));
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
for (var i = 0, m = names.length; i < m; i++) {
|
for (var i = 0, m = names.length; i < m; i++) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user