UNPKG

igniteui-react-inputs

Version:

Ignite UI React input components.

173 lines (172 loc) 6.57 kB
/* 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 { IMultiSliderTrackShadeVisual_$type } from "./IMultiSliderTrackShadeVisual"; 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 { PolyLineSegment } from "igniteui-react-core"; /** * @hidden */ export let DefaultMultiTrackShadeVisual = /*@__PURE__*/ (() => { class DefaultMultiTrackShadeVisual extends Base { get translateX() { return this._translateX; } set translateX(a) { this._translateX = a; } get translateY() { return this._translateY; } set translateY(a) { this._translateY = a; } constructor() { super(); this._translateX = 0; this._translateY = 0; this.a = 0; this.c = -1; this.b = -1; this._shadeBox = null; this._shadeOutline = null; this._allPaths = null; this.shadeBox = new Path(); this.shadeOutline = new Path(); this.allPaths = new List$1(Path.$, 0); this.allPaths.add(this.shadeBox); this.allPaths.add(this.shadeOutline); this.shadeBox._fill = this.getShadeBoxDefaultBrush(); this.shadeOutline._stroke = this.getShadeOutlineDefaultBrush(); this.shadeOutline.ad = this.getShadeOutlineDefaultStrokeThickness(); } getShadeBoxDefaultBrush() { return ((() => { let $ret = new Brush(); $ret.color = Color.u(128, 255, 255, 255); return $ret; })()); } getShadeOutlineDefaultBrush() { return ((() => { let $ret = new Brush(); $ret.color = Color.u(255, 185, 185, 185); return $ret; })()); } getShadeOutlineDefaultStrokeThickness() { return 1; } 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.shadeBox.an = a; } e() { let a = new PathGeometry(); let b = new PathFigure(); let c = new PolyLineSegment(); b._isClosed = false; b._isFilled = false; switch (this.orientation) { case 0: 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 }); break; case 1: 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 }); break; case 2: 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 }); break; case 3: 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 }); break; } b._segments.add(c); a.c.add(b); this.shadeOutline.an = a; } get orientation() { return this.a; } set orientation(a) { let b = this.a; this.a = a; if (b != this.a) { 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 shadeBox() { return this._shadeBox; } set shadeBox(a) { this._shadeBox = a; } get shadeOutline() { return this._shadeOutline; } set shadeOutline(a) { this._shadeOutline = a; } get allPaths() { return this._allPaths; } set allPaths(a) { this._allPaths = a; } } DefaultMultiTrackShadeVisual.$t = /*@__PURE__*/ markType(DefaultMultiTrackShadeVisual, 'DefaultMultiTrackShadeVisual', Base.$, [IMultiSliderTrackShadeVisual_$type]); return DefaultMultiTrackShadeVisual; })();