Skip to content

Commit

Permalink
Ensure resizer on the correct component. Fixes #2876
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Jul 15, 2020
1 parent 012d2d6 commit 44a500e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands/view/SelectComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export default {
this.updateToolsGlobal();
// This will hide some elements from the select component
this.updateToolsLocal(result);
this.initResize(component);
}),

updateGlobalPos() {
Expand Down Expand Up @@ -422,8 +423,7 @@ export default {
const resizeClass = `${pfx}resizing`;
const model =
!isElement(elem) && isTaggableNode(elem) ? elem : em.getSelected();
const resizable = model.get('resizable');
const el = isElement(elem) ? elem : model.getEl();
const resizable = model && model.get('resizable');
let options = {};
let modelToStyle;

Expand All @@ -441,6 +441,7 @@ export default {
};

if (editor && resizable) {
const el = isElement(elem) ? elem : model.getEl();
options = {
// Here the resizer is updated with the current element height and width
onStart(e, opts = {}) {
Expand Down

0 comments on commit 44a500e

Please sign in to comment.