Commit 06e3687ba1bdf90e4eb90a4847d50d50b2214a94
1 parent
91281399
排版
Showing
1 changed file
with
16 additions
and
6 deletions
src/components/Common/Typesetting/typesetting.js
| @@ -277,6 +277,16 @@ const Typesetting = props => { | @@ -277,6 +277,16 @@ const Typesetting = props => { | ||
| 277 | 277 | ||
| 278 | let remaining = isVertical ? commonHeightCheck : commonWidthCheck; | 278 | let remaining = isVertical ? commonHeightCheck : commonWidthCheck; |
| 279 | // const remaining = false; | 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 | const isOdd = num => { | 291 | const isOdd = num => { |
| 282 | return num % 2 !== 0; | 292 | return num % 2 !== 0; |
| @@ -336,7 +346,7 @@ const Typesetting = props => { | @@ -336,7 +346,7 @@ const Typesetting = props => { | ||
| 336 | }} | 346 | }} |
| 337 | > | 347 | > |
| 338 | <div style={{ transform: `rotateZ(${offsetZ}deg)` }}> | 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 | {/* <DynamicSVG {...svgProps} /> */} | 350 | {/* <DynamicSVG {...svgProps} /> */} |
| 341 | </div> | 351 | </div> |
| 342 | </div> | 352 | </div> |
| @@ -371,11 +381,11 @@ const Typesetting = props => { | @@ -371,11 +381,11 @@ const Typesetting = props => { | ||
| 371 | alignItems: "center", | 381 | alignItems: "center", |
| 372 | position: "absolute", | 382 | position: "absolute", |
| 373 | left: `${dFLengthOffset + dYBJJ}px`, | 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 | <div style={{ transform: `rotateZ(${iFAngle}deg)` }}> | 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 | </div> | 389 | </div> |
| 380 | </div> | 390 | </div> |
| 381 | <div | 391 | <div |
| @@ -387,14 +397,14 @@ const Typesetting = props => { | @@ -387,14 +397,14 @@ const Typesetting = props => { | ||
| 387 | justifyContent: "center", | 397 | justifyContent: "center", |
| 388 | alignItems: "center", | 398 | alignItems: "center", |
| 389 | position: "absolute", | 399 | position: "absolute", |
| 390 | - left: `${isVertical ? dSLengthOffset + dYBJJ : jInnerWidth + dFLengthOffset + dSLengthOffset + dYBJJ}px`, | 400 | + left: `${isVertical ? dSLengthOffset : innerWidth + dFLengthOffset + dSLengthOffset + dYBJJ}px`, |
| 391 | top: `${ | 401 | top: `${ |
| 392 | isVertical ? jInnerHeight + dXBJJ + dFWidthOffset + dSWidthOffset : iSAngle === 90 || iSAngle === 270 ? dSWidthOffset : dSWidthOffset + dXBJJ | 402 | isVertical ? jInnerHeight + dXBJJ + dFWidthOffset + dSWidthOffset : iSAngle === 90 || iSAngle === 270 ? dSWidthOffset : dSWidthOffset + dXBJJ |
| 393 | }px`, | 403 | }px`, |
| 394 | }} | 404 | }} |
| 395 | > | 405 | > |
| 396 | <div style={{ transform: `rotateZ(${iSAngle}deg)` }}> | 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 | </div> | 408 | </div> |
| 399 | </div> | 409 | </div> |
| 400 | </div> | 410 | </div> |
| @@ -434,7 +444,7 @@ const Typesetting = props => { | @@ -434,7 +444,7 @@ const Typesetting = props => { | ||
| 434 | {/* <img src={icon} width="100%" height="100%" /> */} | 444 | {/* <img src={icon} width="100%" height="100%" /> */} |
| 435 | {/* {isSvg ? <DynamicSVG {...props} /> : <img src={icon} width="100%" height="100%" />} */} | 445 | {/* {isSvg ? <DynamicSVG {...props} /> : <img src={icon} width="100%" height="100%" />} */} |
| 436 | <div style={{ transform: `rotateZ(${iFAngle}deg)` }}> | 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 | </div> | 448 | </div> |
| 439 | </div> | 449 | </div> |
| 440 | </div> | 450 | </div> |