text.d.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { IGroup } from '@antv/g-base';
  2. import GroupComponent from '../abstract/group-component';
  3. import { ILocation } from '../interfaces';
  4. import { PointLocationCfg, TextAnnotationCfg } from '../types';
  5. declare class TextAnnotation extends GroupComponent<TextAnnotationCfg> implements ILocation<PointLocationCfg> {
  6. /**
  7. * @protected
  8. * 默认的配置项
  9. * @returns {object} 默认的配置项
  10. */
  11. getDefaultCfg(): {
  12. name: string;
  13. type: string;
  14. locationType: string;
  15. x: number;
  16. y: number;
  17. content: string;
  18. rotate: any;
  19. style: {};
  20. background: any;
  21. maxLength: any;
  22. autoEllipsis: boolean;
  23. isVertical: boolean;
  24. ellipsisPosition: string;
  25. defaultCfg: {
  26. style: {
  27. fill: string;
  28. fontSize: number;
  29. textAlign: string;
  30. textBaseline: string;
  31. fontFamily: string;
  32. };
  33. };
  34. container: any;
  35. shapesMap: {};
  36. group: any;
  37. capture: boolean;
  38. isRegister: boolean;
  39. isUpdating: boolean;
  40. isInit: boolean;
  41. id: string;
  42. offsetX: number;
  43. offsetY: number;
  44. animate: boolean;
  45. updateAutoRender: boolean;
  46. animateOption: {
  47. appear: any;
  48. update: {
  49. duration: number;
  50. easing: string;
  51. };
  52. enter: {
  53. duration: number;
  54. easing: string;
  55. };
  56. leave: {
  57. duration: number;
  58. easing: string;
  59. };
  60. };
  61. events: any;
  62. visible: boolean;
  63. };
  64. setLocation(location: PointLocationCfg): void;
  65. protected renderInner(group: IGroup): void;
  66. private resetLocation;
  67. }
  68. export default TextAnnotation;