merge method
Merge an OptionsDiff
into current MathOptions
Implementation
MathOptions merge(OptionsDiff partialOptions) {
var res = this;
if (partialOptions.size != null) {
res = res.havingSize(partialOptions.size!);
}
if (partialOptions.style != null) {
res = res.havingStyle(partialOptions.style!);
}
if (partialOptions.color != null) {
res = res.withColor(partialOptions.color!);
}
// if (partialOptions.phantom == true) {
// res = res.withPhantom();
// }
if (partialOptions.textFontOptions != null) {
res = res.withTextFont(partialOptions.textFontOptions!);
}
if (partialOptions.mathFontOptions != null) {
res = res.withMathFont(partialOptions.mathFontOptions!);
}
return res;
}