SNoneLegendItem.ts 640 B

12345678910111213141516171819202122232425262728
  1. import { SGraphItem } from "@saga-web/graph/lib";
  2. import { Legend } from '../types/Legend';
  3. /**
  4. * 图例节点Item(非图例类型)
  5. *
  6. * * @author 张宇(taohuzy@163.com)
  7. */
  8. export class SNoneLegendItem extends SGraphItem {
  9. /** 图例节点对象数据 */
  10. data: Legend;
  11. /**
  12. * 构造函数
  13. *
  14. * @param parent 指向父对象
  15. * @param data 图例节点对象数据
  16. */
  17. constructor(parent: SGraphItem | null, data: Legend) {
  18. super(parent);
  19. this.data = data;
  20. this.id = data.ID;
  21. }
  22. toData(): Legend {
  23. return this.data;
  24. }
  25. } // Class SNoneLegendItem