3dc040406e03d4672b49e7f059d052fef6e90e39bb1eea9a70085d75ba9f70dd2b60d9105d0050284503eaecf74979181b2963d7aca678aa353db3685fdea3 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import * as graphic from '../../util/graphic.js';
  2. import ComponentView from '../../view/Component.js';
  3. import LegendModel, { LegendOption, LegendSelectorButtonOption } from './LegendModel.js';
  4. import GlobalModel from '../../model/Global.js';
  5. import ExtensionAPI from '../../core/ExtensionAPI.js';
  6. import { ZRRectLike } from '../../util/types.js';
  7. declare class LegendView extends ComponentView {
  8. static type: string;
  9. type: string;
  10. newlineDisabled: boolean;
  11. private _contentGroup;
  12. private _backgroundEl;
  13. private _selectorGroup;
  14. /**
  15. * If first rendering, `contentGroup.position` is [0, 0], which
  16. * does not make sense and may cause unexepcted animation if adopted.
  17. */
  18. private _isFirstRender;
  19. init(): void;
  20. /**
  21. * @protected
  22. */
  23. getContentGroup(): graphic.Group;
  24. /**
  25. * @protected
  26. */
  27. getSelectorGroup(): graphic.Group;
  28. /**
  29. * @override
  30. */
  31. render(legendModel: LegendModel, ecModel: GlobalModel, api: ExtensionAPI): void;
  32. protected resetInner(): void;
  33. protected renderInner(itemAlign: LegendOption['align'], legendModel: LegendModel, ecModel: GlobalModel, api: ExtensionAPI, selector: LegendSelectorButtonOption[], orient: LegendOption['orient'], selectorPosition: LegendOption['selectorPosition']): void;
  34. private _createSelector;
  35. private _createItem;
  36. protected layoutInner(legendModel: LegendModel, itemAlign: LegendOption['align'], maxSize: {
  37. width: number;
  38. height: number;
  39. }, isFirstRender: boolean, selector: LegendOption['selector'], selectorPosition: LegendOption['selectorPosition']): ZRRectLike;
  40. /**
  41. * @protected
  42. */
  43. remove(): void;
  44. }
  45. export default LegendView;