zhangweicheng 7 سال پیش
والد
کامیت
409a99bf11

+ 1 - 4
public/web/sheet/sheet_common.js

@@ -493,9 +493,9 @@ var sheetCommonObj = {
                     ctx.fill();//画实心圆
                     ctx.closePath();
                     ctx.restore();
+                    w = w - imageWidth - imageMagin;
                     //这里的左对齐的,当显示的字长度超过空白地方时,要改成右对齐
                     if(style.hAlign == 0){
-                        w = w - imageWidth - imageMagin;
                         if(value){
                             let textWidth = ctx.measureText(value).width;
                             let spaceWidth = w;
@@ -503,10 +503,7 @@ var sheetCommonObj = {
                                 style.hAlign = 2;
                             }
                         }
-                    }else if(style.hAlign == 2){//如果是右对齐的,往左边挪,给按钮留出空间
-                        x = x - imageWidth - imageMagin;
                     }
-
                 }
             }
             GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);

+ 1 - 1
web/building_saas/main/js/views/project_view.js

@@ -1953,7 +1953,7 @@ var projectObj = {
                     ctx.fill();//画实心圆
                     ctx.closePath();
                     ctx.restore();
-                    x = x - imageWidth - imageMagin;
+                    w = w - imageWidth - imageMagin;
                 }
             }
             GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);

+ 1 - 1
web/building_saas/main/js/views/quantity_edit_view.js

@@ -80,7 +80,7 @@ let quantityEditObj = {
                     ctx.fill();//画实心圆
                     ctx.closePath();
                     ctx.restore();
-                    x = x - imageWidth - imageMagin;
+                    w = w - imageWidth - imageMagin;
                 }
             }
             GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);