Images won't resize to full width
Question
When an image is resized with the mouse, it won't stretch all the way to the edge of the canvas, leaving a white space on the right side. If adjusting Dimensions --> Width, you can bring it all the way to the edge of the canvas.

If you drag enough elements onto the canvas for the scrollbar to appear, the scrollbar fills the white space that the image wouldn't fill. It appears the dragging is just taking the scroll bar into consideration and won't fill the scroll bar's area, even if the scroll bar doesn't exist yet.

Answers (3)
Seems like I totally forget about this issue 😂 thanks to @benvmatheson for the ping. I apologize also to @giorgiosjames for totally ignoring his PR 😬 even because I have to close it as he is right, we can do it correctly and dynamically without relying on some kind of option (just need to get the width of the body instead of the iframe). The fix will be available in the next release
Not sure but it might also be an issue in the resizer configuration https://github.com/artf/grapesjs/blob/3f053af969ef6a688d526d158b9df7e6aa076838/src/commands/view/SelectComponent.js#L353
This seems to be caused by the padding value here: https://github.com/artf/grapesjs/blob/3f053af969ef6a688d526d158b9df7e6aa076838/src/commands/view/SelectComponent.js#L449 Setting this value to 0 allows me to resize components right to the edge of the canvas. Unsure on why this padding was there in the first place or if removing it is going to break something else.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1368
Resize canvas
Is there a way to have a dynamic resizing of the canvas? i.e not using the Device Manager, but having a drag and drop of the width, similar...
Issue #2592
Modal width
Hello, is there a way to set a modal's width, its currently set to 850px by CSS, but I would like to create a dialog with a small amount of...
Issue #1711
Error in prompt position after moving canvas
1、移动画布 2、点击layerManager(如果不点击layerManager 不会出错) 3、画布里的提示框位置出错 1、 moving canvas 2、 click layerManager (If you don't click layerManager, it w...
Issue #4323
BUG: Performance issue while dragging component to canvas when you have 2k component on canvas
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Google Chrome Version 101.0.4951.41 (Officia...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.