Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images won't resize to full width #2002

Closed
benvmatheson opened this issue May 7, 2019 · 5 comments
Closed

Images won't resize to full width #2002

benvmatheson opened this issue May 7, 2019 · 5 comments

Comments

@benvmatheson
Copy link
Contributor

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.

image

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.

image

https://jsfiddle.net/benvmatheson/2r3jdfpa/6/

@artf
Copy link
Member

artf commented May 11, 2019

@giorgiosjames
Copy link

giorgiosjames commented Jun 28, 2019

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.

@benvmatheson
Copy link
Contributor Author

This issue appears to still exist on 0.15.3.

@artf
Copy link
Member

artf commented Aug 26, 2019

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

@giorgiosjames
Copy link

@artf No worries. Glad to see this fixed in a more concrete way.

@artf artf closed this as completed in 7dee6ee Aug 26, 2019
jcamejo pushed a commit to jcamejo/grapesjs that referenced this issue Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants