|
|
@@ -224,7 +224,7 @@ var TREE_SHEET_HELPER = {
|
|
|
}
|
|
|
sheet.invalidateLayout();
|
|
|
},
|
|
|
- showTreeData: function (setting, sheet, tree) {
|
|
|
+ getTipCellType: function (setting) {
|
|
|
let TipCellType = function () {};
|
|
|
TipCellType.prototype = new GC.Spread.Sheets.CellTypes.Text();
|
|
|
TipCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
|
|
|
@@ -247,7 +247,7 @@ var TREE_SHEET_HELPER = {
|
|
|
zoom = hitinfo.sheet.zoom();
|
|
|
let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: hitinfo.sheet, row: hitinfo.row, col: hitinfo.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
|
|
|
let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
|
|
|
- let dataField = setting.cols[hitinfo.col].data.field;
|
|
|
+ let dataField = setting.cols && setting.cols[hitinfo.col].data.field || setting.header[hitinfo.col].dataCode;
|
|
|
|
|
|
if((tag==undefined||tag=='')&&hitinfo.sheet.getCell(hitinfo.row,hitinfo.col).wordWrap()==true){//显示其它列的标记为空并且设置了自动换行
|
|
|
return;
|
|
|
@@ -280,8 +280,10 @@ var TREE_SHEET_HELPER = {
|
|
|
};
|
|
|
TipCellType.prototype.processMouseLeave = function (hitinfo) {
|
|
|
TREE_SHEET_HELPER.hideTipsDiv();
|
|
|
- }
|
|
|
-
|
|
|
+ };
|
|
|
+ return new TipCellType();
|
|
|
+ },
|
|
|
+ showTreeData: function (setting, sheet, tree) {
|
|
|
TREE_SHEET_HELPER.protectdSheet(sheet);
|
|
|
TREE_SHEET_HELPER.massOperationSheet(sheet, function () {
|
|
|
sheet.rowOutlines.direction(GC.Spread.Sheets.Outlines.OutlineDirection.backward);
|
|
|
@@ -294,7 +296,7 @@ var TREE_SHEET_HELPER = {
|
|
|
setting.cols.forEach(function (colSetting, iCol) {
|
|
|
sheet.setStyle(-1, iCol, TREE_SHEET_HELPER.getSheetCellStyle(colSetting));
|
|
|
if (colSetting.showHint) {
|
|
|
- sheet.getRange(-1, iCol, -1, 1).cellType(new TipCellType());
|
|
|
+ sheet.getRange(-1, iCol, -1, 1).cellType(TREE_SHEET_HELPER.getTipCellType(setting));
|
|
|
}
|
|
|
if(colSetting.formatter){
|
|
|
sheet.setFormatter(-1, iCol, colSetting.formatter, GC.Spread.Sheets.SheetArea.viewport);
|
|
|
@@ -616,7 +618,7 @@ var TREE_SHEET_HELPER = {
|
|
|
|
|
|
},
|
|
|
showTipsDiv:function (text,setting,hitinfo) {
|
|
|
- if (setting.pos && text && text !== '') {
|
|
|
+ if (text && text !== '') {
|
|
|
if(text) text = replaceAll(/[\n]/,'<br>',text);
|
|
|
if(!this._fixedTipElement){
|
|
|
let div = $('#fixedTip')[0];
|
|
|
@@ -669,6 +671,7 @@ var TREE_SHEET_HELPER = {
|
|
|
let left = setting.pos.x + hitinfo.cellRect.x;
|
|
|
$(this._toolTipElement).css("top", top).css("left", left).css("max-width","500px");
|
|
|
}
|
|
|
+ $(this._toolTipElement).css('z-index', 9999);
|
|
|
$(this._toolTipElement).show("fast");
|
|
|
TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
|
|
|
}
|