Browse Source

TS ComponentPrev

ts-style-manager
Artur Arseniev 4 years ago
parent
commit
af6ab8fbc9
  1. 9
      src/commands/view/ComponentPrev.ts

9
src/commands/view/ComponentPrev.js → src/commands/view/ComponentPrev.ts

@ -1,7 +1,10 @@
import Component from '../../dom_components/model/Component';
import { CustomCommand } from './CommandAbstract';
export default { export default {
run(ed) { run(ed) {
if (!ed.Canvas.hasFocus()) return; if (!ed.Canvas.hasFocus()) return;
const toSelect = []; const toSelect: Component[] = [];
ed.getSelectedAll().forEach(cmp => { ed.getSelectedAll().forEach(cmp => {
const parent = cmp.parent(); const parent = cmp.parent();
@ -9,7 +12,7 @@ export default {
let incr = 0; let incr = 0;
let at = 0; let at = 0;
let next; let next: any;
// Get the first selectable component // Get the first selectable component
do { do {
@ -23,4 +26,4 @@ export default {
toSelect.length && ed.select(toSelect); toSelect.length && ed.select(toSelect);
}, },
}; } as CustomCommand;
Loading…
Cancel
Save