Commit 3e23349c2f92c82511dd31fe1ad837feaa1cee97

Authored by 陈鑫涛
1 parent 6dbda369

排版

src/components/Common/Typesetting/typesetting.js
@@ -218,7 +218,6 @@ const Typesetting = props => { @@ -218,7 +218,6 @@ const Typesetting = props => {
218 jInnerHeight = innerWidth; 218 jInnerHeight = innerWidth;
219 jInnerWidth = innerHeight; 219 jInnerWidth = innerHeight;
220 } 220 }
221 - console.log(state.selectedNode.sTypeKey,'55555');  
222 221
223 const innerHeightCombined = isVertical 222 const innerHeightCombined = isVertical
224 ? jInnerHeight * 2 + dSWidthOffset + dFWidthOffset + dXBJJ 223 ? jInnerHeight * 2 + dSWidthOffset + dFWidthOffset + dXBJJ
@@ -242,13 +241,14 @@ const Typesetting = props => { @@ -242,13 +241,14 @@ const Typesetting = props => {
242 let cols = dSWidthOffsetCombined === 0 ? 0 : Math.floor(outerWidth / dSWidthOffsetCombined); 241 let cols = dSWidthOffsetCombined === 0 ? 0 : Math.floor(outerWidth / dSWidthOffsetCombined);
243 const rowsCombined = innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset); 242 const rowsCombined = innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset);
244 let rows = rowsCombined === 0 ? 0 : Math.floor(outerHeight / rowsCombined); 243 let rows = rowsCombined === 0 ? 0 : Math.floor(outerHeight / rowsCombined);
245 - let colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ) + dZBLB + dYBLB; 244 + let colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ) + dZBLB + dYBLB - dSLengthOffset;
  245 +
  246 + let rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) + dSBLB + dXBLB - dSWidthOffset;
246 while (colsMaxLength >= outerWidth && cols > 0) { 247 while (colsMaxLength >= outerWidth && cols > 0) {
247 cols = cols - 1; 248 cols = cols - 1;
248 colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ); 249 colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ);
249 } 250 }
250 251
251 - let rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) + dSBLB + dXBLB ;  
252 while (rowsMaxLength>= outerHeight && rows > 0) { 252 while (rowsMaxLength>= outerHeight && rows > 0) {
253 rows = rows - 1; 253 rows = rows - 1;
254 rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) ; 254 rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) ;
@@ -280,6 +280,10 @@ const Typesetting = props => { @@ -280,6 +280,10 @@ const Typesetting = props => {
280 console.log('剩余 总高 盒高' , outerHeight, rowsCombined); 280 console.log('剩余 总高 盒高' , outerHeight, rowsCombined);
281 console.log('剩余 总长 盒长' , outerWidth, dSWidthOffsetCombined); 281 console.log('剩余 总长 盒长' , outerWidth, dSWidthOffsetCombined);
282 console.log('剩余 根据列排最大长高',colsMaxLength,rowsMaxLength); 282 console.log('剩余 根据列排最大长高',colsMaxLength,rowsMaxLength);
  283 + console.log('剩余 一组盒长盒高', innerWidthCombined,innerHeightCombined,boxLengthOffset,boxWidthOffset);
  284 + console.log('剩余 次盒偏移量',dSLengthOffset,dSWidthOffset);
  285 +
  286 +
283 287
284 // const remaining = false; 288 // const remaining = false;
285 const isOdd = num => { 289 const isOdd = num => {