UNPKG

igniteui-react-inputs

Version:

Ignite UI React input components.

243 lines (242 loc) 9.17 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 { __extends } from "tslib"; import { Base, Point_$type, markType } from "igniteui-react-core"; import { IMultiSliderTrackRangeVisual_$type } from "./IMultiSliderTrackRangeVisual"; 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 */ var DefaultMultiSliderTrackRangeVisual = /** @class */ /*@__PURE__*/ (function (_super) { __extends(DefaultMultiSliderTrackRangeVisual, _super); function DefaultMultiSliderTrackRangeVisual() { var _this = _super.call(this) || this; _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; return _this; } DefaultMultiSliderTrackRangeVisual.prototype.getThumbBoxDefaultStroke = function () { return ((function () { var $ret = new Brush(); $ret.color = Color.u(255, 185, 185, 185); return $ret; })()); }; DefaultMultiSliderTrackRangeVisual.prototype.getThumbBoxDefaultStrokeThickness = function () { return 1; }; DefaultMultiSliderTrackRangeVisual.prototype.getThumbBoxDefaultBrush = function () { return ((function () { var $ret = new Brush(); $ret.color = Color.u(255, 249, 249, 249); return $ret; })()); }; DefaultMultiSliderTrackRangeVisual.prototype.getThumbRidgesDefaultStroke = function () { return ((function () { var $ret = new Brush(); $ret.color = Color.u(255, 119, 119, 119); return $ret; })()); }; Object.defineProperty(DefaultMultiSliderTrackRangeVisual.prototype, "translateX", { get: function () { return this._translateX; }, set: function (a) { this._translateX = a; }, enumerable: false, configurable: true }); Object.defineProperty(DefaultMultiSliderTrackRangeVisual.prototype, "translateY", { get: function () { return this._translateY; }, set: function (a) { this._translateY = a; }, enumerable: false, configurable: true }); DefaultMultiSliderTrackRangeVisual.prototype.e = function () { if (this.orientation == 0) { var a = new PathGeometry(); var b = new PathFigure(); var 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); var d = new PathFigure(); var 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); var f = new PathFigure(); var 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 { var h = new PathGeometry(); var i = new PathFigure(); var 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); var k = new PathFigure(); var 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); var m = new PathFigure(); var 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; } }; DefaultMultiSliderTrackRangeVisual.prototype.d = function () { var a = new PathGeometry(); var b = new PathFigure(); var 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; }; Object.defineProperty(DefaultMultiSliderTrackRangeVisual.prototype, "orientation", { get: function () { return this.a; }, set: function (a) { var b = this.a; this.a = a; if (this.a != b) { this.f(); } }, enumerable: false, configurable: true }); Object.defineProperty(DefaultMultiSliderTrackRangeVisual.prototype, "width", { get: function () { return this.c; }, set: function (a) { var b = this.c; this.c = a; if (b != this.c) { this.f(); } }, enumerable: false, configurable: true }); DefaultMultiSliderTrackRangeVisual.prototype.f = function () { if (this.width > 0 && this.height > 0) { this.d(); this.e(); } }; Object.defineProperty(DefaultMultiSliderTrackRangeVisual.prototype, "height", { get: function () { return this.b; }, set: function (a) { var b = this.b; this.b = a; if (this.b != b) { this.f(); } }, enumerable: false, configurable: true }); Object.defineProperty(DefaultMultiSliderTrackRangeVisual.prototype, "thumbBox", { get: function () { return this._thumbBox; }, set: function (a) { this._thumbBox = a; }, enumerable: false, configurable: true }); Object.defineProperty(DefaultMultiSliderTrackRangeVisual.prototype, "thumbRidges", { get: function () { return this._thumbRidges; }, set: function (a) { this._thumbRidges = a; }, enumerable: false, configurable: true }); Object.defineProperty(DefaultMultiSliderTrackRangeVisual.prototype, "allPaths", { get: function () { return this._allPaths; }, set: function (a) { this._allPaths = a; }, enumerable: false, configurable: true }); DefaultMultiSliderTrackRangeVisual.$t = markType(DefaultMultiSliderTrackRangeVisual, 'DefaultMultiSliderTrackRangeVisual', Base.$, [IMultiSliderTrackRangeVisual_$type]); return DefaultMultiSliderTrackRangeVisual; }(Base)); export { DefaultMultiSliderTrackRangeVisual };