Browse Source

Ensure the resizer focus on selected component

pull/1069/head
Artur Arseniev 8 years ago
parent
commit
9f0ed070eb
  1. 1
      src/commands/view/Resize.js
  2. 8
      src/commands/view/SelectComponent.js

1
src/commands/view/Resize.js

@ -19,6 +19,7 @@ module.exports = {
}
canvasResizer.setOptions(options);
canvasResizer.blur();
canvasResizer.focus(el);
return canvasResizer;
},

8
src/commands/view/SelectComponent.js

@ -262,8 +262,10 @@ module.exports = {
* @param {Object} el
* @private
* */
onSelect(em, model) {
const editor = this.editor;
onSelect() {
// Get the selected model directly from the Editor as the event might
// be triggered manually without the model
const model = this.em.getSelected();
this.updateToolbar(model);
if (model) {
@ -273,7 +275,7 @@ module.exports = {
this.hideHighlighter();
this.initResize(el);
} else {
editor.stopCommand('resize');
this.editor.stopCommand('resize');
}
},

Loading…
Cancel
Save