Commit 943a860b1fc4596a11a046937fa8ae4aef1e706a
1 parent
e8b62d4a
首盒边距
Showing
1 changed file
with
4 additions
and
2 deletions
src/components/Common/Typesetting/typesetting.js
| ... | ... | @@ -205,6 +205,7 @@ const Typesetting = props => { |
| 205 | 205 | const boxWidthOffset = evaluateFormula(sSecondLongitudinalOffset, variabless); // 第二列纵向偏移 |
| 206 | 206 | const isVertical = sSettingMethod === "从上到下"; // true 表示竖向排列,false 表示横向排列 sSettingMethod === '从上到下' |
| 207 | 207 | const reference = sSGroupOffset === "首盒"; // 第三列参考 |
| 208 | + console.log(reference,'reference') | |
| 208 | 209 | // 计算内层盒子尺寸 加上间距 |
| 209 | 210 | let jInnerHeight = innerHeight; |
| 210 | 211 | let jInnerWidth = innerWidth; |
| ... | ... | @@ -453,14 +454,15 @@ const Typesetting = props => { |
| 453 | 454 | ); |
| 454 | 455 | // 计算左偏移 |
| 455 | 456 | const calculateLeftPosition = (col, reference, isVertical, leftPosition, dYBJJ, dSLengthOffset) => { |
| 457 | + console.log(isVertical,reference,'reference'); | |
| 456 | 458 | if (isVertical) { |
| 457 | 459 | if (reference) { |
| 458 | - return col === 0 ? leftPosition : leftPosition; | |
| 460 | + return col === 0 ? leftPosition : leftPosition + (dYBJJ * col); | |
| 459 | 461 | } |
| 460 | 462 | return col === 0 ? leftPosition : leftPosition + (boxLengthOffset + dYBJJ) * col; |
| 461 | 463 | } else { |
| 462 | 464 | if (reference) { |
| 463 | - return col === 0 ? leftPosition : leftPosition; | |
| 465 | + return col === 0 ? leftPosition : leftPosition + (dYBJJ * col); | |
| 464 | 466 | } |
| 465 | 467 | return col === 0 ? leftPosition : leftPosition + (boxLengthOffset + dYBJJ) * col + dSLengthOffset * col; |
| 466 | 468 | } | ... | ... |