placements.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. export interface AdjustOverflow {
  2. adjustX?: 0 | 1;
  3. adjustY?: 0 | 1;
  4. }
  5. export interface PlacementsConfig {
  6. arrowWidth?: number;
  7. horizontalArrowShift?: number;
  8. verticalArrowShift?: number;
  9. arrowPointAtCenter?: boolean;
  10. autoAdjustOverflow?: boolean | AdjustOverflow;
  11. }
  12. export declare function getOverflowOptions(autoAdjustOverflow?: boolean | AdjustOverflow): {
  13. adjustX: number;
  14. adjustY: number;
  15. };
  16. export default function getPlacements(config: PlacementsConfig): {
  17. left: {
  18. points: string[];
  19. offset: number[];
  20. };
  21. right: {
  22. points: string[];
  23. offset: number[];
  24. };
  25. top: {
  26. points: string[];
  27. offset: number[];
  28. };
  29. bottom: {
  30. points: string[];
  31. offset: number[];
  32. };
  33. topLeft: {
  34. points: string[];
  35. offset: number[];
  36. };
  37. leftTop: {
  38. points: string[];
  39. offset: number[];
  40. };
  41. topRight: {
  42. points: string[];
  43. offset: number[];
  44. };
  45. rightTop: {
  46. points: string[];
  47. offset: number[];
  48. };
  49. bottomRight: {
  50. points: string[];
  51. offset: number[];
  52. };
  53. rightBottom: {
  54. points: string[];
  55. offset: number[];
  56. };
  57. bottomLeft: {
  58. points: string[];
  59. offset: number[];
  60. };
  61. leftBottom: {
  62. points: string[];
  63. offset: number[];
  64. };
  65. };