Browse Source

树结构绘制,父项连接每层缩进统一减少5个像素

MaiXinRong 7 năm trước cách đây
mục cha
commit
1b8cc97998
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      public/web/tree_sheet/tree_sheet_helper.js

+ 2 - 2
public/web/tree_sheet/tree_sheet_helper.js

@@ -161,7 +161,7 @@ var TREE_SHEET_HELPER = {
     },
     showTreeData: function (setting, sheet, tree) {
         let indent = 20;
-        let levelIndent = -3;
+        let levelIndent = -5;
         let halfBoxLength = 5;
         let halfExpandLength = 3;
 
@@ -268,7 +268,7 @@ var TREE_SHEET_HELPER = {
                 }
             };
             // Draw Text
-            x = x + (node.depth() + 1) * indent;
+            x = x + (node.depth() + 1) * indent +  node.depth() * levelIndent;
             GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
         };
         TreeNodeCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {