grid.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. import * as Registry from '../registry';
  2. import { Base } from './base';
  3. export declare class GridManager extends Base {
  4. protected instance: Registry.Grid | null;
  5. protected patterns: Registry.Grid.Definition[];
  6. protected get elem(): HTMLDivElement;
  7. protected get grid(): GridManager.Options;
  8. protected init(): void;
  9. protected startListening(): void;
  10. protected stopListening(): void;
  11. protected setVisible(visible: boolean): void;
  12. getGridSize(): number;
  13. setGridSize(size: number): void;
  14. show(): void;
  15. hide(): void;
  16. clear(): void;
  17. draw(options?: GridManager.DrawGridOptions): void;
  18. update(options?: Partial<Registry.Grid.Options> | Partial<Registry.Grid.Options>[]): void;
  19. protected getInstance(): Registry.Grid;
  20. protected resolveGrid(options?: GridManager.DrawGridOptions): Registry.Grid.Definition[] | never;
  21. dispose(): void;
  22. }
  23. export declare namespace GridManager {
  24. type DrawGridOptions = Registry.Grid.NativeItem | Registry.Grid.ManaualItem | {
  25. args?: Registry.Grid.OptionsMap['dot'];
  26. };
  27. interface CommonOptions {
  28. size: number;
  29. visible: boolean;
  30. }
  31. type Options = CommonOptions & DrawGridOptions;
  32. }