@antv/x6
Version:
JavaScript diagramming library that uses SVG and HTML for rendering
6 lines (5 loc) • 536 B
TypeScript
export declare function getClass(elem: Element): string;
export declare function hasClass(elem: Element | null, selector: string | null): boolean;
export declare function addClass(elem: Element | null, selector: ((cls: string) => string) | string | null): void;
export declare function removeClass(elem: Element | null, selector?: ((cls: string) => string) | string | null): void;
export declare function toggleClass(elem: Element | null, selector: ((cls: string, state?: boolean) => string) | string | null, stateVal?: boolean): void;