|
@@ -30,7 +30,6 @@ var TREE_SHEET_HELPER = {
|
|
spread.options.cutCopyIndicatorVisible = false;
|
|
spread.options.cutCopyIndicatorVisible = false;
|
|
spread.options.allowCopyPasteExcelStyle = false;
|
|
spread.options.allowCopyPasteExcelStyle = false;
|
|
spread.options.allowUserDragDrop = false;
|
|
spread.options.allowUserDragDrop = false;
|
|
- spread.options.
|
|
|
|
spread.getActiveSheet().setRowCount(3);
|
|
spread.getActiveSheet().setRowCount(3);
|
|
return spread;
|
|
return spread;
|
|
},
|
|
},
|
|
@@ -61,7 +60,7 @@ var TREE_SHEET_HELPER = {
|
|
for (i = 0; i < col.head.spanCols.length; i++) {
|
|
for (i = 0; i < col.head.spanCols.length; i++) {
|
|
if (col.head.spanCols[i] !== 0) {
|
|
if (col.head.spanCols[i] !== 0) {
|
|
cell = sheet.getCell(iRow, index, GC.Spread.Sheets.SheetArea.colHeader);
|
|
cell = sheet.getCell(iRow, index, GC.Spread.Sheets.SheetArea.colHeader);
|
|
- cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(col.head.wordWrap);
|
|
|
|
|
|
+ cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
|
|
}
|
|
}
|
|
if (col.head.spanCols[i] > 1 || col.head.spanRows[i] > 1) {
|
|
if (col.head.spanCols[i] > 1 || col.head.spanRows[i] > 1) {
|
|
sheet.addSpan(iRow, index, col.head.spanRows[i], col.head.spanCols[i], GC.Spread.Sheets.SheetArea.colHeader);
|
|
sheet.addSpan(iRow, index, col.head.spanRows[i], col.head.spanCols[i], GC.Spread.Sheets.SheetArea.colHeader);
|
|
@@ -131,12 +130,12 @@ var TREE_SHEET_HELPER = {
|
|
}
|
|
}
|
|
return data;
|
|
return data;
|
|
};
|
|
};
|
|
- if (colSetting.data.getText) {
|
|
|
|
|
|
+ if (colSetting.data.getText && Object.prototype.toString.apply(colSetting.data.getText) === "[object Function]") {
|
|
cell.value(colSetting.data.getText(node));
|
|
cell.value(colSetting.data.getText(node));
|
|
} else {
|
|
} else {
|
|
cell.value(getFieldText2());
|
|
cell.value(getFieldText2());
|
|
}
|
|
}
|
|
- if (colSetting.data.cellType) {
|
|
|
|
|
|
+ if (colSetting.data.cellType && Object.prototype.toString.apply(colSetting.data.cellType) !== "[object String]") {
|
|
cell.cellType(colSetting.data.cellType);
|
|
cell.cellType(colSetting.data.cellType);
|
|
}
|
|
}
|
|
if (colSetting.readOnly) {
|
|
if (colSetting.readOnly) {
|
|
@@ -164,7 +163,6 @@ var TREE_SHEET_HELPER = {
|
|
};
|
|
};
|
|
TreeNodeCellType.prototype = new GC.Spread.Sheets.CellTypes.Text();
|
|
TreeNodeCellType.prototype = new GC.Spread.Sheets.CellTypes.Text();
|
|
TreeNodeCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
|
|
TreeNodeCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
|
|
- console.log(style);
|
|
|
|
if (style.backColor) {
|
|
if (style.backColor) {
|
|
ctx.save();
|
|
ctx.save();
|
|
ctx.fillStyle = style.backColor;
|
|
ctx.fillStyle = style.backColor;
|