xzw 5 ماه پیش
والد
کامیت
eb7db8ffa1
1فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 7 3
      src/custom/modules/clipModel/Clip.js

+ 7 - 3
src/custom/modules/clipModel/Clip.js

@@ -719,12 +719,16 @@ var Clip = {
                     //固定文字大小和边距像素    //如果有一边过小,可能超出画面外,暂时不管这种可能
                     const fontsize = math.linearClamp(w, [100, 700, 8000], [12, 20, 30])
                     
-                    const marginSelf = {//img外的margin(标尺内)
+                    /* const marginSelf = {//img外的margin(标尺内)
                         left :  ifShowRuler ? 76 : 40,
                         right :  ifShowRuler ? 30 : 40,
-                        bottom :  (70 + fontsize*2) ,/*  ifShowRuler ? (70 + fontsize*2) : (40 + fontsize*2) ,*/
+                        bottom :  (70 + fontsize*2) , 
                         top :  ifShowRuler ? 60 : 40,
-                    }
+                    } */
+                    const marginSelf = {//img外的margin(标尺内)
+                        left :  76 ,        right :  40, 
+                        bottom :  (70 + fontsize*2) ,   top :  60 ,
+                    }//因要求无论有无标尺比例尺都一样,所以marginSelf必须一样
                     
                     //文字的边距
                     let bottomRatioToImg = - Math.min(fontsize*2.5,   ifShowRuler ? marginSelf.bottom : marginSelf.bottom*0.8 ) / h//- (marginSelf.bottom - fontsize)/ h  //在img之下. text底部到img底部的距离