Browse Source

Update the selected event in SelectComponent

pull/1069/head
Artur Arseniev 9 years ago
parent
commit
e5538bf0e8
  1. 5
      src/commands/view/SelectComponent.js

5
src/commands/view/SelectComponent.js

@ -54,7 +54,7 @@ module.exports = {
methods[method](body, 'click', this.onClick); methods[method](body, 'click', this.onClick);
methods[method](win, 'scroll resize', this.onFrameScroll); methods[method](win, 'scroll resize', this.onFrameScroll);
methods[method](win, 'keydown', this.onKeyPress); methods[method](win, 'keydown', this.onKeyPress);
em[method]('component:selected', this.onSelect, this); em[method]('change:selectedComponent', this.onSelect, this);
}, },
/** /**
@ -262,7 +262,7 @@ module.exports = {
* @param {Object} el * @param {Object} el
* @private * @private
* */ * */
onSelect(model) { onSelect(em, model) {
const editor = this.editor; const editor = this.editor;
this.updateToolbar(model); this.updateToolbar(model);
@ -377,7 +377,6 @@ module.exports = {
if (typeof resizable == 'object') { if (typeof resizable == 'object') {
options = { ...options, ...resizable }; options = { ...options, ...resizable };
} }
console.log('init resize');
editor.runCommand('resize', { el, options }); editor.runCommand('resize', { el, options });
// On undo/redo the resizer rect is not updating, need somehow to call // On undo/redo the resizer rect is not updating, need somehow to call

Loading…
Cancel
Save