|
|
|
@ -20,8 +20,7 @@
|
|
|
|
|
bgap: 0, |
|
|
|
|
text: "", |
|
|
|
|
py: "", |
|
|
|
|
highLight: false, |
|
|
|
|
lineNumber: null, |
|
|
|
|
highLight: false |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
@ -55,20 +54,12 @@
|
|
|
|
|
if (BI.isWidthOrHeight(o.maxWidth)) { |
|
|
|
|
this.element.css({maxWidth: o.maxWidth}); |
|
|
|
|
} |
|
|
|
|
var cssObj = { |
|
|
|
|
this.element.css({ |
|
|
|
|
textAlign: o.textAlign, |
|
|
|
|
whiteSpace: this._getTextWrap(), |
|
|
|
|
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "", |
|
|
|
|
overflow: o.whiteSpace === "nowrap" ? "" : (BI.isWidthOrHeight(o.height) ? "auto" : ""), |
|
|
|
|
}; |
|
|
|
|
if (BI.isNumber(o.lineNumber)) { |
|
|
|
|
BI.extend(cssObj, { |
|
|
|
|
display: "-webkit-box", |
|
|
|
|
"-webkit-line-clamp": o.lineNumber + "", |
|
|
|
|
"-webkit-box-orient": "vertical", |
|
|
|
|
overflow: o.whiteSpace === "nowrap" ? "" : (BI.isWidthOrHeight(o.height) ? "auto" : "") |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.element.css(cssObj); |
|
|
|
|
if (o.handler && o.handler !== BI.emptyFn) { |
|
|
|
|
this.text = BI.createWidget({ |
|
|
|
|
type: "bi.layout", |
|
|
|
|