123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- import { SGraphItem } from "@saga-web/graph/lib";
- import { SPoint } from "@saga-web/draw/lib";
- import { SPolylineItem } from '@saga-web/big/lib';
- import { Legend } from '../types/Legend';
- export class SLineLegendItem extends SPolylineItem {
-
- data: Legend;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- set name(v: string) {
- this.data.Name = v;
- }
- set line(arr: SPoint[]) {
- if (this.data.Properties) {
- this.data.Properties.Line = arr;
- }
- }
- set x(v: number) {
- this.data.Pos.X = v;
- }
- set y(v: number) {
- this.data.Pos.Y = v;
- }
- set width(v: number) {
- if (this.data.Size) {
- this.data.Size.Width = v;
- }
- }
- set height(v: number) {
- if (this.data.Size) {
- this.data.Size.Height = v;
- }
- }
-
- constructor(parent: SGraphItem | null, data: Legend) {
- super(parent,[]);
- this.data = data;
- this.id = data.ID;
- this.moveTo(data.Pos.X, data.Pos.Y);
-
-
-
-
-
-
-
- if (data.Size) {
- this.width = data.Size.Width;
- this.height = data.Size.Height;
- }
- if (data.Properties && data.Properties.Line) {
- this.line = data.Properties.Line;
- }
- }
- }
|