Definable.d.ts 1.3 KB

12345678910111213141516171819202122232425262728
  1. import { createElement } from '../core';
  2. import Path from '../../graphic/Path';
  3. import ZRImage from '../../graphic/Image';
  4. import TSpan from '../../graphic/TSpan';
  5. import Displayable from '../../graphic/Displayable';
  6. export default class Definable {
  7. nextId: number;
  8. protected _zrId: number;
  9. protected _svgRoot: SVGElement;
  10. protected _tagNames: string[];
  11. protected _markLabel: string;
  12. protected _domName: string;
  13. constructor(zrId: number, svgRoot: SVGElement, tagNames: string | string[], markLabel: string, domName?: string);
  14. createElement: typeof createElement;
  15. getDefs(isForceCreating?: boolean): SVGDefsElement;
  16. doUpdate<T>(target: T, onUpdate?: (target: T) => void): void;
  17. add(target: any): SVGElement;
  18. addDom(dom: SVGElement): void;
  19. removeDom<T>(target: T): void;
  20. getDoms(): SVGElement[];
  21. markAllUnused(): void;
  22. markDomUsed(dom: SVGElement): void;
  23. markDomUnused(dom: SVGElement): void;
  24. isDomUnused(dom: SVGElement): boolean;
  25. removeUnused(): void;
  26. getSvgProxy(displayable: Displayable): import("../graphic").SVGProxy<Path<import("../../graphic/Path").PathProps>> | import("../graphic").SVGProxy<ZRImage> | import("../graphic").SVGProxy<TSpan>;
  27. getSvgElement(displayable: Displayable): SVGElement;
  28. }