mirror of https://github.com/artf/grapesjs.git
nocodeframeworkdrag-and-dropsite-buildersite-generatortemplate-builderui-builderweb-builderweb-builder-frameworkwebsite-builderno-codepage-builder
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
502 B
17 lines
502 B
import Component from '../../dom_components/model/Component';
|
|
import { CommandObject } from './CommandAbstract';
|
|
|
|
export default {
|
|
run(ed) {
|
|
if (!ed.Canvas.hasFocus()) return;
|
|
const toSelect: Component[] = [];
|
|
|
|
ed.getSelectedAll().forEach((component) => {
|
|
const coll = component.components();
|
|
const next = coll && coll.filter((c: any) => c.get('selectable'))[0];
|
|
next && toSelect.push(next);
|
|
});
|
|
|
|
toSelect.length && ed.select(toSelect);
|
|
},
|
|
} as CommandObject;
|
|
|