|
|
@@ -862,7 +862,9 @@ const projTreeObj = {
|
|
|
const nodeIndent = node ? (node.depth() + 1) * indent + node.depth() * levelIndent + imgWidth + 5 : 0;
|
|
|
const cellWidth = context.sheet.getCell(-1, context.col).width();
|
|
|
const textLength = this.getAutoFitWidth(...arguments);
|
|
|
- const lineNum = Math.ceil(textLength / (cellWidth - nodeIndent));
|
|
|
+ const tempNum = textLength / (cellWidth - nodeIndent);
|
|
|
+ const lineNum = tempNum % 1 > 0.92 ? Math.ceil(tempNum + 1) : Math.ceil(tempNum); // 不这么处理的话有些行高算出来不对
|
|
|
+ //const lineNum = Math.ceil(textLength / (cellWidth - nodeIndent));
|
|
|
return lineNum * defaultHeight;
|
|
|
};
|
|
|
TreeNodeCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
|