@moveable/helper
Version:
Helper for demo of Moveable
21 lines (20 loc) • 1.67 kB
TypeScript
import { GroupArrayChild, GroupSingleChild } from "./groups";
import { GroupChild, TargetGroupsObject, TargetGroupsType, TargetList } from "./types";
export declare function toTargetList(raw: GroupChild[]): TargetList;
export declare class GroupManager extends GroupArrayChild {
type: "root";
private _targets;
constructor(targetGroups: TargetGroupsType, targets?: Array<HTMLElement | SVGElement>);
set(targetGroups: TargetGroupsObject, targets?: Array<HTMLElement | SVGElement>): void;
selectSubChilds(targets: TargetGroupsType, target: HTMLElement | SVGElement): TargetList;
selectSingleChilds(targets: TargetGroupsType, added: Array<HTMLElement | SVGElement>, removed: Array<HTMLElement | SVGElement>): TargetList;
selectCompletedChilds(targets: TargetGroupsType, added: Array<HTMLElement | SVGElement>, removed: Array<HTMLElement | SVGElement>, continueSelect?: boolean): TargetList;
selectSameDepthChilds(targets: TargetGroupsType, added: Array<HTMLElement | SVGElement>, removed: Array<HTMLElement | SVGElement>, continueSelect?: boolean): TargetList;
toChilds(targets: TargetGroupsType): GroupChild[];
toSingleChild(element: HTMLElement | SVGElement, isAuto: true): GroupSingleChild;
toSingleChild(element: HTMLElement | SVGElement, isAuto?: boolean): GroupSingleChild | undefined;
findArrayChildById(id: string): GroupArrayChild | null;
group(targets: TargetGroupsType, flatten?: boolean): TargetGroupsType | null;
ungroup(targets: TargetGroupsType): TargetGroupsType | null;
protected _findParentGroup(element: HTMLElement | SVGElement, range: Array<HTMLElement | SVGElement>): GroupArrayChild;
}