fix(super-editor): constrain images to table cell width in web layout (SD-2416)#2680
Conversation
… mode getMaxContentSize() returned an empty object in web layout mode, bypassing the table cell width constraint added in SD-1156. Move the cell check before the web layout early return so images inserted into a cell are resized to fit.
3e8a05c to
5b1bc63
Compare
…traint - Add tableHeader web layout test to Editor.webLayout.test.ts - Add getAllowedImageDimensions tests for height: Infinity (the web layout + table cell code path) - Add test for image fitting within constraints with Infinity height
caio-pizzol
left a comment
There was a problem hiding this comment.
@luccas-harbour looks good — images now get constrained in web layout too. pushed a commit with a couple extra tests. approving.
|
🎉 This PR is included in vscode-ext v1.1.0-next.62 |
|
🎉 This PR is included in @superdoc-dev/react v1.0.0-next.16 The release is available on GitHub release |
|
🎉 This PR is included in esign v2.2.0-next.20 The release is available on GitHub release |
|
🎉 This PR is included in template-builder v1.3.0-next.19 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-cli v0.5.0-next.59 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.24.0-next.59 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.3.0-next.60 |
|
🎉 This PR is included in superdoc-sdk v1.4.0 |
|
🎉 This PR is included in superdoc v1.25.0 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-cli v0.6.0 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.3.0-next.1 |
|
🎉 This PR is included in esign v2.3.0-next.1 The release is available on GitHub release |
|
🎉 This PR is included in template-builder v1.5.0-next.1 The release is available on GitHub release |
Summary
getMaxContentSize()so it runs for both print and web layout modes{ width: cellWidth, height: Infinity }(no page height to constrain against)