Issue #2002💬 AnsweredOpened May 8, 2019by benvmatheson1 reactions

Images won't resize to full width

Quick answerby artf1

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 i...

Read full answer below ↓

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. https://jsfiddle.net/benvmatheson/2r3jdfpa/6/

Answers (3)

artfAugust 27, 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...

giorgiosjamesJune 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...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.