Browse Source

Up ComponentExit

ts-style-manager
Artur Arseniev 4 years ago
parent
commit
0359697d2c
  1. 7
      src/commands/view/ComponentExit.ts

7
src/commands/view/ComponentExit.js → src/commands/view/ComponentExit.ts

@ -1,7 +1,10 @@
import Component from '../../dom_components/model/Component';
import { CustomCommand } from './CommandAbstract';
export default { export default {
run(ed, snd, opts = {}) { run(ed, snd, opts = {}) {
if (!ed.Canvas.hasFocus() && !opts.force) return; if (!ed.Canvas.hasFocus() && !opts.force) return;
const toSelect = []; const toSelect: Component[] = [];
ed.getSelectedAll().forEach(component => { ed.getSelectedAll().forEach(component => {
let next = component.parent(); let next = component.parent();
@ -16,4 +19,4 @@ export default {
toSelect.length && ed.select(toSelect); toSelect.length && ed.select(toSelect);
}, },
}; } as CustomCommand;
Loading…
Cancel
Save