brush.d.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import { BrushCfg } from '../types';
  2. /**
  3. * G2 已经内置了 brush、brush-x、brush-y 等交互,其它:
  4. *
  5. * 1. element-range-highlight 是否可用重命名为 brush-highlight?(mask 可以移动)
  6. * 2. brush-visible 与 brush 的区别是?
  7. */
  8. declare function isPointInView(context: any): any;
  9. /**
  10. * 获取 交互 start 阶段的相关配置
  11. */
  12. export declare function getInteractionCfg(interactionType: string, brushType?: string, options?: BrushCfg): {
  13. showEnable: ({
  14. trigger: string;
  15. action: string;
  16. isEnable: (context: any) => boolean;
  17. } | {
  18. trigger: string;
  19. action: string;
  20. isEnable?: undefined;
  21. })[];
  22. start: {
  23. trigger: string;
  24. isEnable: typeof isPointInView;
  25. action: string[];
  26. arg: {
  27. maskStyle: import("@antv/g2").ShapeAttrs;
  28. }[];
  29. }[];
  30. processing: {
  31. trigger: string;
  32. isEnable: typeof isPointInView;
  33. action: string[];
  34. }[];
  35. end: {
  36. trigger: string;
  37. isEnable: typeof isPointInView;
  38. action: string[];
  39. }[];
  40. rollback: {
  41. trigger: string;
  42. action: string[];
  43. }[];
  44. } | {
  45. showEnable: ({
  46. trigger: string;
  47. action: string;
  48. isEnable: (context: any) => boolean;
  49. } | {
  50. trigger: string;
  51. action: string;
  52. isEnable?: undefined;
  53. })[];
  54. start: ({
  55. trigger: string;
  56. isEnable: (context: any) => boolean;
  57. action: string[];
  58. arg: {
  59. maskStyle: import("@antv/g2").ShapeAttrs;
  60. }[];
  61. } | {
  62. trigger: string;
  63. action: string[];
  64. isEnable?: undefined;
  65. arg?: undefined;
  66. })[];
  67. processing: {
  68. trigger: string;
  69. action: string[];
  70. }[];
  71. end: ({
  72. trigger: string;
  73. action: string[];
  74. isEnable?: undefined;
  75. } | {
  76. trigger: string;
  77. isEnable(context: any): boolean;
  78. action: string[];
  79. })[];
  80. rollback: {
  81. trigger: string;
  82. action: string[];
  83. }[];
  84. } | {
  85. showEnable?: undefined;
  86. start?: undefined;
  87. processing?: undefined;
  88. end?: undefined;
  89. rollback?: undefined;
  90. };
  91. export {};