Commit 06e3687ba1bdf90e4eb90a4847d50d50b2214a94

Authored by 陈鑫涛
1 parent 91281399

排版

src/components/Common/Typesetting/typesetting.js
... ... @@ -277,6 +277,16 @@ const Typesetting = props => {
277 277  
278 278 let remaining = isVertical ? commonHeightCheck : commonWidthCheck;
279 279 // const remaining = false;
  280 + console.log(innerWidth, '盒长');
  281 + console.log(innerHeight, '盒高');
  282 + console.log(dFWidthOffset, '首盒纵向偏移');
  283 + console.log(dFLengthOffset, '首盒横向偏移');
  284 + console.log(dSWidthOffset,radioValue?.sSWidthOffset, '次盒纵向偏移');
  285 + console.log(dSLengthOffset,radioValue?.sSLengthOffset, '次盒横向偏移');
  286 + console.log(boxLengthOffset, '第二列横向偏移');
  287 + console.log(boxWidthOffset, '第二列纵向偏移');
  288 + console.log(variabless,'variabless');
  289 +
280 290  
281 291 const isOdd = num => {
282 292 return num % 2 !== 0;
... ... @@ -336,7 +346,7 @@ const Typesetting = props => {
336 346 }}
337 347 >
338 348 <div style={{ transform: `rotateZ(${offsetZ}deg)` }}>
339   - {!sSvgPath ? <DynamicSVG {...svgProps} /> : <img src={sSvgPath} width="100%" height="100%" />}
  349 + {!sSvgPath ? <DynamicSVG {...svgProps} /> : <img src={sSvgPath} width={jInnerWidth} height={jInnerHeight} />}
340 350 {/* <DynamicSVG {...svgProps} /> */}
341 351 </div>
342 352 </div>
... ... @@ -371,11 +381,11 @@ const Typesetting = props =&gt; {
371 381 alignItems: "center",
372 382 position: "absolute",
373 383 left: `${dFLengthOffset + dYBJJ}px`,
374   - top: `${iFAngle === 90 || iFAngle === 270 ? 0 : dFWidthOffset + dXBJJ}px`,
  384 + top: `${iFAngle === 90 || iFAngle === 270 ? dFLengthOffset : dFWidthOffset + dXBJJ}px`,
375 385 }}
376 386 >
377 387 <div style={{ transform: `rotateZ(${iFAngle}deg)` }}>
378   - {!sSvgPath ? <DynamicSVG {...svgProps} /> : <img src={sSvgPath} width="100%" height="100%" />}
  388 + {!sSvgPath ? <DynamicSVG {...svgProps} /> : <img src={sSvgPath} width={ `${iSAngle === 90 || iSAngle === 270 ? jInnerWidth : innerWidth}px`} height={ `${iFAngle === 90 || iFAngle === 270 ? jInnerHeight : innerHeight}px`} />}
379 389 </div>
380 390 </div>
381 391 <div
... ... @@ -387,14 +397,14 @@ const Typesetting = props =&gt; {
387 397 justifyContent: "center",
388 398 alignItems: "center",
389 399 position: "absolute",
390   - left: `${isVertical ? dSLengthOffset + dYBJJ : jInnerWidth + dFLengthOffset + dSLengthOffset + dYBJJ}px`,
  400 + left: `${isVertical ? dSLengthOffset : innerWidth + dFLengthOffset + dSLengthOffset + dYBJJ}px`,
391 401 top: `${
392 402 isVertical ? jInnerHeight + dXBJJ + dFWidthOffset + dSWidthOffset : iSAngle === 90 || iSAngle === 270 ? dSWidthOffset : dSWidthOffset + dXBJJ
393 403 }px`,
394 404 }}
395 405 >
396 406 <div style={{ transform: `rotateZ(${iSAngle}deg)` }}>
397   - {!sSvgPath ? <DynamicSVG {...svgProps} /> : <img src={sSvgPath} width="100%" height="100%" />}
  407 + {!sSvgPath ? <DynamicSVG {...svgProps} /> : <img src={sSvgPath} width={ `${iSAngle === 90 || iSAngle === 270 ? jInnerWidth : innerWidth}px`} height={`${iSAngle === 90 || iSAngle === 270 ? jInnerHeight : innerHeight}px`} />}
398 408 </div>
399 409 </div>
400 410 </div>
... ... @@ -434,7 +444,7 @@ const Typesetting = props =&gt; {
434 444 {/* <img src={icon} width="100%" height="100%" /> */}
435 445 {/* {isSvg ? <DynamicSVG {...props} /> : <img src={icon} width="100%" height="100%" />} */}
436 446 <div style={{ transform: `rotateZ(${iFAngle}deg)` }}>
437   - {!sSvgPath ? <DynamicSVG {...svgProps} /> : <img src={sSvgPath} width="100%" height="100%" />}
  447 + {!sSvgPath ? <DynamicSVG {...svgProps} /> : <img src={sSvgPath} width={`${innerWidth}px`} height={`${innerHeight}px`} />}
438 448 </div>
439 449 </div>
440 450 </div>
... ...