Skip to content

Commit

Permalink
Fix image resize issue. Closes #2002
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Aug 26, 2019
1 parent d2a7ed6 commit 7dee6ee
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/commands/view/SelectComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,8 @@ export default {
const style = modelToStyle.getStyle();

if (!onlyHeight) {
const padding = 10;
const frameOffset = canvas.getCanvasView().getFrameOffset();
const width =
rect.w < frameOffset.width - padding
? rect.w
: frameOffset.width - padding;
const bodyw = canvas.getBody().offsetWidth;
const width = rect.w < bodyw ? rect.w : bodyw;
style[keyWidth] = autoWidth ? 'auto' : `${width}${unitWidth}`;
}

Expand Down

0 comments on commit 7dee6ee

Please sign in to comment.