handler.d.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import { IGroup } from '@antv/g-base';
  2. import GroupComponent from '../abstract/group-component';
  3. import { GroupComponentCfg } from '../types';
  4. interface IStyle {
  5. fill?: string;
  6. stroke?: string;
  7. radius?: number;
  8. opacity?: number;
  9. cursor?: string;
  10. highLightFill?: string;
  11. }
  12. export interface HandlerCfg extends GroupComponentCfg {
  13. readonly x: number;
  14. readonly y: number;
  15. readonly width: number;
  16. readonly height: number;
  17. readonly style?: IStyle;
  18. }
  19. export declare const DEFAULT_HANDLER_STYLE: {
  20. fill: string;
  21. stroke: string;
  22. radius: number;
  23. opacity: number;
  24. cursor: string;
  25. highLightFill: string;
  26. };
  27. export declare class Handler extends GroupComponent<HandlerCfg> {
  28. getDefaultCfg(): {
  29. name: string;
  30. x: number;
  31. y: number;
  32. width: number;
  33. height: number;
  34. style: {
  35. fill: string;
  36. stroke: string;
  37. radius: number;
  38. opacity: number;
  39. cursor: string;
  40. highLightFill: string;
  41. };
  42. container: any;
  43. shapesMap: {};
  44. group: any;
  45. capture: boolean;
  46. isRegister: boolean;
  47. isUpdating: boolean;
  48. isInit: boolean;
  49. id: string;
  50. type: string;
  51. locationType: string;
  52. offsetX: number;
  53. offsetY: number;
  54. animate: boolean;
  55. updateAutoRender: boolean;
  56. animateOption: {
  57. appear: any;
  58. update: {
  59. duration: number;
  60. easing: string;
  61. };
  62. enter: {
  63. duration: number;
  64. easing: string;
  65. };
  66. leave: {
  67. duration: number;
  68. easing: string;
  69. };
  70. };
  71. events: any;
  72. defaultCfg: {};
  73. visible: boolean;
  74. };
  75. protected renderInner(group: IGroup): void;
  76. protected applyOffset(): void;
  77. protected initEvent(): void;
  78. private bindEvents;
  79. private draw;
  80. }
  81. export default Handler;