fix italic bold underline of richtext

This commit is contained in:
zilongshanren
2016-08-30 11:58:15 +08:00
parent eb454e5ce0
commit 3f87d5b5fa
+3 -1
View File
@@ -429,7 +429,6 @@ var RichText = cc.Class({
} else {
if (oldItem.style) {
if (newItem.style) {
//TODO: add more when adding bold/italic/underline
if(oldItem.style.size != newItem.style.size) {
return true;
}
@@ -596,6 +595,9 @@ var RichText = cc.Class({
var index = label._styleIndex;
label.setLineHeight(this.lineHeight);
label.setVerticalAlign(VerticalAlign.CENTER);
label.enableBold(false);
label.enableItalics(false);
label.enableUnderline(false);
var textStyle = null;
if(this._textArray[index]) {