Commit f54583f30bb783944e530202ee6bc0813eefc4ce

Authored by 陈鑫涛
1 parent b9a3604b

排版

src/components/Common/Typesetting/typesetting.js
... ... @@ -224,10 +224,11 @@ const Typesetting = props => {
224 224 : Math.max(jInnerHeight + dFWidthOffset, jInnerHeight + dSWidthOffset) + dXBJJ; // 计算内层盒子高度 从上向下排列 取首盒加偏移量和次盒加偏移量最大的值 从左往右排列 盒子尺寸 * 2 加上首盒偏移量和次盒偏移量
225 225 // 计算内层盒子宽度 从上向下排列 取首盒加偏移量和次盒加偏移量最大的值 从左往右排列 盒子尺寸 * 2 加上首盒偏移量和次盒偏移量
226 226 const innerWidthCombined = isVertical
227   - ? Math.max(jInnerWidth + dFLengthOffset, jInnerWidth + dSLengthOffset) + dYBJJ
  227 +? Math.max(jInnerWidth + dFLengthOffset, jInnerWidth + dSLengthOffset) + dYBJJ
228 228 : jInnerWidth * 2 + dSLengthOffset + dFLengthOffset + dYBJJ;
229 229  
230   - console.log(innerWidthCombined,innerHeightCombined,jInnerWidth,jInnerHeight,'innerHeightCombined');
  230 + console.log(innerWidthCombined,dFLengthOffset,dSLengthOffset,jInnerWidth,'innerHeightCombined');
  231 + console.log(innerHeightCombined,dFWidthOffset,dSWidthOffset,innerHeightCombined,'innerHeightCombined');
231 232  
232 233 const style = {
233 234 width: `${outerWidth}px`,
... ... @@ -517,14 +518,14 @@ const Typesetting = props => {
517 518 if (cols === 0 || rows === 0) {
518 519 if (cols > 0) {
519 520 for (let col = 0; col < cols; col++) {
520   - const leftPosition = col * (innerWidthCombined + dYBJJ);
  521 + const leftPosition = col * (innerWidthCombined);
521 522 const topPosition = 0 * (innerHeightCombined + dXBJJ);
522 523 innerDivs.push(createBoxOne(col, 0, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
523 524 }
524 525 }
525 526 if (rows > 0) {
526 527 for (let row = 0; row < rows; row++) {
527   - const leftPosition = 0 * (innerWidthCombined + dYBJJ);
  528 + const leftPosition = 0 * (innerWidthCombined);
528 529 const topPosition = row * (innerHeightCombined + dXBJJ);
529 530 innerDivs.push(createBoxOne(0, row, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
530 531 }
... ... @@ -532,8 +533,8 @@ const Typesetting = props =&gt; {
532 533 } else {
533 534 for (let col = 0; col < cols; col++) {
534 535 for (let row = 0; row < rows; row++) {
535   - const leftPosition = col * (innerWidthCombined + dYBJJ);
536   - const topPosition = row * (innerHeightCombined + dXBJJ);
  536 + const leftPosition = col * (innerWidthCombined);
  537 + const topPosition = row * (innerHeightCombined + dXBJJ) ;
537 538 innerDivs.push(createBox(col, row, 1, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
538 539 }
539 540 // 如果可以放下首盒
... ... @@ -544,10 +545,10 @@ const Typesetting = props =&gt; {
544 545 if (reference) {
545 546 // 是否首盒
546 547 // 首盒的上边距下边距 末尾盒子的上下边距 添加那一行的上边距
547   - leftPosition = col * (innerWidthCombined + dYBJJ) + dFLengthOffset;
  548 + leftPosition = col * (innerWidthCombined) + dFLengthOffset;
548 549 topPosition = rows * (innerHeightCombined + dXBJJ) + dFWidthOffset;
549 550 } else {
550   - leftPosition = col * (innerWidthCombined + dYBJJ);
  551 + leftPosition = col * (innerWidthCombined);
551 552 topPosition = rows * (innerHeightCombined + dXBJJ);
552 553 }
553 554 innerDivs.push(createBoxOne(col, rows, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
... ... @@ -558,9 +559,9 @@ const Typesetting = props =&gt; {
558 559 let leftPosition = 0;
559 560 if (reference) {
560 561 topPosition = index * (innerHeightCombined + boxWidthOffset);
561   - leftPosition = cols * (innerWidthCombined + boxLengthOffset);
  562 + leftPosition = cols * (innerWidthCombined + boxLengthOffset + dXBJJ);
562 563 } else {
563   - topPosition = index * (innerHeightCombined + boxWidthOffset + dSWidthOffset);
  564 + topPosition = index * (innerHeightCombined + boxWidthOffset + dSWidthOffset + dXBJJ);
564 565 leftPosition = cols * (innerWidthCombined + boxLengthOffset + dSLengthOffset);
565 566 }
566 567 innerDivs.push(createDiv(col, index, 3, leftPosition + col * dYBJJ, topPosition + index * dXBJJ, iFAngle, DisableMateriallIcon));
... ...