diff --git a/src/components/Common/Typesetting/typesetting.js b/src/components/Common/Typesetting/typesetting.js index e470664..36401ef 100644 --- a/src/components/Common/Typesetting/typesetting.js +++ b/src/components/Common/Typesetting/typesetting.js @@ -218,7 +218,6 @@ const Typesetting = props => { jInnerHeight = innerWidth; jInnerWidth = innerHeight; } - console.log(state.selectedNode.sTypeKey,'55555'); const innerHeightCombined = isVertical ? jInnerHeight * 2 + dSWidthOffset + dFWidthOffset + dXBJJ @@ -242,13 +241,14 @@ const Typesetting = props => { let cols = dSWidthOffsetCombined === 0 ? 0 : Math.floor(outerWidth / dSWidthOffsetCombined); const rowsCombined = innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset); let rows = rowsCombined === 0 ? 0 : Math.floor(outerHeight / rowsCombined); - let colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ) + dZBLB + dYBLB; + let colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ) + dZBLB + dYBLB - dSLengthOffset; + + let rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) + dSBLB + dXBLB - dSWidthOffset; while (colsMaxLength >= outerWidth && cols > 0) { cols = cols - 1; colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ); } - let rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) + dSBLB + dXBLB ; while (rowsMaxLength>= outerHeight && rows > 0) { rows = rows - 1; rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) ; @@ -280,6 +280,10 @@ const Typesetting = props => { console.log('剩余 总高 盒高' , outerHeight, rowsCombined); console.log('剩余 总长 盒长' , outerWidth, dSWidthOffsetCombined); console.log('剩余 根据列排最大长高',colsMaxLength,rowsMaxLength); + console.log('剩余 一组盒长盒高', innerWidthCombined,innerHeightCombined,boxLengthOffset,boxWidthOffset); + console.log('剩余 次盒偏移量',dSLengthOffset,dSWidthOffset); + + // const remaining = false; const isOdd = num => {