Browse Source

Fix image resize issue. Closes #2002

pull/2219/head
Artur Arseniev 7 years ago
parent
commit
7dee6eeaff
  1. 8
      src/commands/view/SelectComponent.js

8
src/commands/view/SelectComponent.js

@ -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}`;
}

Loading…
Cancel
Save