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