Browse Source

TS ComponentNext

ts-style-manager
Artur Arseniev 3 years ago
parent
commit
3f6237ced3
  1. 9
      src/commands/view/ComponentNext.ts

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

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