igniteui-react-inputs
Version:
Ignite UI React input components.
207 lines (206 loc) • 7.9 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 { __extends } from "tslib";
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
*/
var DefaultMultiTrackShadeVisual = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DefaultMultiTrackShadeVisual, _super);
function DefaultMultiTrackShadeVisual() {
var _this = _super.call(this) || this;
_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();
return _this;
}
Object.defineProperty(DefaultMultiTrackShadeVisual.prototype, "translateX", {
get: function () {
return this._translateX;
},
set: function (a) {
this._translateX = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultMultiTrackShadeVisual.prototype, "translateY", {
get: function () {
return this._translateY;
},
set: function (a) {
this._translateY = a;
},
enumerable: false,
configurable: true
});
DefaultMultiTrackShadeVisual.prototype.getShadeBoxDefaultBrush = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(128, 255, 255, 255);
return $ret;
})());
};
DefaultMultiTrackShadeVisual.prototype.getShadeOutlineDefaultBrush = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(255, 185, 185, 185);
return $ret;
})());
};
DefaultMultiTrackShadeVisual.prototype.getShadeOutlineDefaultStrokeThickness = function () {
return 1;
};
DefaultMultiTrackShadeVisual.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.shadeBox.an = a;
};
DefaultMultiTrackShadeVisual.prototype.e = function () {
var a = new PathGeometry();
var b = new PathFigure();
var 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;
};
Object.defineProperty(DefaultMultiTrackShadeVisual.prototype, "orientation", {
get: function () {
return this.a;
},
set: function (a) {
var b = this.a;
this.a = a;
if (b != this.a) {
this.f();
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultMultiTrackShadeVisual.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
});
DefaultMultiTrackShadeVisual.prototype.f = function () {
if (this.width > 0 && this.height > 0) {
this.d();
this.e();
}
};
Object.defineProperty(DefaultMultiTrackShadeVisual.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(DefaultMultiTrackShadeVisual.prototype, "shadeBox", {
get: function () {
return this._shadeBox;
},
set: function (a) {
this._shadeBox = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultMultiTrackShadeVisual.prototype, "shadeOutline", {
get: function () {
return this._shadeOutline;
},
set: function (a) {
this._shadeOutline = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultMultiTrackShadeVisual.prototype, "allPaths", {
get: function () {
return this._allPaths;
},
set: function (a) {
this._allPaths = a;
},
enumerable: false,
configurable: true
});
DefaultMultiTrackShadeVisual.$t = markType(DefaultMultiTrackShadeVisual, 'DefaultMultiTrackShadeVisual', Base.$, [IMultiSliderTrackShadeVisual_$type]);
return DefaultMultiTrackShadeVisual;
}(Base));
export { DefaultMultiTrackShadeVisual };