igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
209 lines (208 loc) • 7.72 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Base, Point_$type, markType } from "igniteui-react-core";
import { ITrackRangeVisual_$type } from "./ITrackRangeVisual";
import { Path } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { PathFigure } from "igniteui-react-core";
import { LineSegment } from "igniteui-react-core";
import { PolyLineSegment } from "igniteui-react-core";
/**
* @hidden
*/
export let DefaultTrackRangeVisual = /*@__PURE__*/ (() => {
class DefaultTrackRangeVisual extends Base {
constructor() {
super();
this._translateX = 0;
this._translateY = 0;
this.a = 0;
this.c = -1;
this.b = -1;
this._thumbBox = null;
this._thumbRidges = null;
this._allPaths = null;
this.thumbBox = new Path();
this.thumbRidges = new Path();
this.allPaths = new List$1(Path.$, 0);
this.allPaths.add(this.thumbBox);
this.allPaths.add(this.thumbRidges);
this.thumbBox._stroke = this.getThumbBoxDefaultStroke();
this.thumbBox.ad = 1;
this.thumbBox._fill = this.getThumbBoxDefaultBrush();
this.thumbRidges._stroke = this.getThumbRidgesDefaultStroke();
this.thumbRidges.ad = 1;
}
getThumbBoxDefaultStroke() {
return ((() => {
let $ret = new Brush();
$ret.color = Color.u(255, 185, 185, 185);
return $ret;
})());
}
getThumbBoxDefaultStrokeThickness() {
return 1;
}
getThumbBoxDefaultBrush() {
return ((() => {
let $ret = new Brush();
$ret.color = Color.u(255, 249, 249, 249);
return $ret;
})());
}
getThumbRidgesDefaultStroke() {
return ((() => {
let $ret = new Brush();
$ret.color = Color.u(255, 119, 119, 119);
return $ret;
})());
}
get translateX() {
return this._translateX;
}
set translateX(a) {
this._translateX = a;
}
get translateY() {
return this._translateY;
}
set translateY(a) {
this._translateY = a;
}
e() {
if (this.orientation == 0) {
let a = new PathGeometry();
let b = new PathFigure();
let c = new LineSegment(1);
b._isClosed = false;
b._isFilled = false;
b._startPoint = { $type: Point_$type, x: -3, y: (this.height / -2) * 0.5 };
c.c = { $type: Point_$type, x: -3, y: (this.height / 2) * 0.5 };
b._segments.add(c);
a.c.add(b);
let d = new PathFigure();
let e = new LineSegment(1);
d._isClosed = false;
d._isFilled = false;
d._startPoint = { $type: Point_$type, x: 0, y: (this.height / -2) * 0.5 };
e.c = { $type: Point_$type, x: 0, y: (this.height / 2) * 0.5 };
d._segments.add(e);
a.c.add(d);
let f = new PathFigure();
let g = new LineSegment(1);
f._isClosed = false;
f._isFilled = false;
f._startPoint = { $type: Point_$type, x: 3, y: (this.height / -2) * 0.5 };
g.c = { $type: Point_$type, x: 3, y: (this.height / 2) * 0.5 };
f._segments.add(g);
a.c.add(f);
this.thumbRidges.an = a;
}
else {
let h = new PathGeometry();
let i = new PathFigure();
let j = new LineSegment(1);
i._isClosed = false;
i._isFilled = false;
i._startPoint = { $type: Point_$type, x: (this.width / -2) * 0.5, y: -3 };
j.c = { $type: Point_$type, x: (this.width / 2) * 0.5, y: -3 };
i._segments.add(j);
h.c.add(i);
let k = new PathFigure();
let l = new LineSegment(1);
k._isClosed = false;
k._isFilled = false;
k._startPoint = { $type: Point_$type, x: (this.width / -2) * 0.5, y: 0 };
l.c = { $type: Point_$type, x: (this.width / 2) * 0.5, y: 0 };
k._segments.add(l);
h.c.add(k);
let m = new PathFigure();
let n = new LineSegment(1);
m._isClosed = false;
m._isFilled = false;
i._startPoint = { $type: Point_$type, x: (this.width / -2) * 0.5, y: 3 };
j.c = { $type: Point_$type, x: (this.width / 2) * 0.5, y: 3 };
m._segments.add(n);
h.c.add(m);
this.thumbRidges.an = h;
}
}
d() {
let a = new PathGeometry();
let b = new PathFigure();
let c = new PolyLineSegment();
b._isClosed = true;
b._isFilled = true;
b._startPoint = { $type: Point_$type, x: this.width / -2, y: this.height / -2 };
c._points.add({ $type: Point_$type, x: this.width / 2, y: this.height / -2 });
c._points.add({ $type: Point_$type, x: this.width / 2, y: this.height / 2 });
c._points.add({ $type: Point_$type, x: this.width / -2, y: this.height / 2 });
b._segments.add(c);
a.c.add(b);
this.thumbBox.an = a;
}
get orientation() {
return this.a;
}
set orientation(a) {
let b = this.a;
this.a = a;
if (this.a != b) {
this.f();
}
}
get width() {
return this.c;
}
set width(a) {
let b = this.c;
this.c = a;
if (b != this.c) {
this.f();
}
}
f() {
if (this.width > 0 && this.height > 0) {
this.d();
this.e();
}
}
get height() {
return this.b;
}
set height(a) {
let b = this.b;
this.b = a;
if (this.b != b) {
this.f();
}
}
get thumbBox() {
return this._thumbBox;
}
set thumbBox(a) {
this._thumbBox = a;
}
get thumbRidges() {
return this._thumbRidges;
}
set thumbRidges(a) {
this._thumbRidges = a;
}
get allPaths() {
return this._allPaths;
}
set allPaths(a) {
this._allPaths = a;
}
}
DefaultTrackRangeVisual.$t = /*@__PURE__*/ markType(DefaultTrackRangeVisual, 'DefaultTrackRangeVisual', Base.$, [ITrackRangeVisual_$type]);
return DefaultTrackRangeVisual;
})();