|
|
|
@ -2,7 +2,7 @@ import { isArray } from 'underscore'; |
|
|
|
|
|
|
|
module.exports = { |
|
|
|
run(ed, sender, opts = {}) { |
|
|
|
if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return; |
|
|
|
if (ed.getModel().isEditing()) return; |
|
|
|
let components = opts.component || ed.getSelectedAll(); |
|
|
|
components = isArray(components) ? [...components] : [components]; |
|
|
|
|
|
|
|
@ -17,6 +17,7 @@ module.exports = { |
|
|
|
} |
|
|
|
if (component) { |
|
|
|
const coll = component.collection; |
|
|
|
component.trigger('component:destroy'); |
|
|
|
coll && coll.remove(component); |
|
|
|
} |
|
|
|
}); |
|
|
|
|