igniteui-react-inputs
Version:
Ignite UI React input components.
140 lines (139 loc) • 5.13 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 { IMultiSliderTrackBarVisual_$type } from "./IMultiSliderTrackBarVisual";
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 DefaultMultiSliderTrackBarVisual = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DefaultMultiSliderTrackBarVisual, _super);
function DefaultMultiSliderTrackBarVisual() {
var _this = _super.call(this) || this;
_this._translateX = 0;
_this._translateY = 0;
_this.b = -1;
_this.a = -1;
_this._barBox = null;
_this._allPaths = null;
_this.barBox = new Path();
_this.allPaths = new List$1(Path.$, 0);
_this.allPaths.add(_this.barBox);
_this.barBox._fill = _this.getBarBoxDefaultBrush();
return _this;
}
Object.defineProperty(DefaultMultiSliderTrackBarVisual.prototype, "translateX", {
get: function () {
return this._translateX;
},
set: function (a) {
this._translateX = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultMultiSliderTrackBarVisual.prototype, "translateY", {
get: function () {
return this._translateY;
},
set: function (a) {
this._translateY = a;
},
enumerable: false,
configurable: true
});
DefaultMultiSliderTrackBarVisual.prototype.getBarBoxDefaultBrush = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(255, 218, 218, 218);
return $ret;
})());
};
DefaultMultiSliderTrackBarVisual.prototype.getBarBoxDefaultOutline = function () {
return null;
};
DefaultMultiSliderTrackBarVisual.prototype.getBarBoxDefaultStrokeThickness = function () {
return 0;
};
DefaultMultiSliderTrackBarVisual.prototype.c = 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.barBox.an = a;
};
Object.defineProperty(DefaultMultiSliderTrackBarVisual.prototype, "width", {
get: function () {
return this.b;
},
set: function (a) {
var b = this.b;
this.b = a;
if (b != this.b) {
this.d();
}
},
enumerable: false,
configurable: true
});
DefaultMultiSliderTrackBarVisual.prototype.d = function () {
if (this.width > 0 && this.height > 0) {
this.c();
}
};
Object.defineProperty(DefaultMultiSliderTrackBarVisual.prototype, "height", {
get: function () {
return this.a;
},
set: function (a) {
var b = this.a;
this.a = a;
if (this.a != b) {
this.d();
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultMultiSliderTrackBarVisual.prototype, "barBox", {
get: function () {
return this._barBox;
},
set: function (a) {
this._barBox = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultMultiSliderTrackBarVisual.prototype, "allPaths", {
get: function () {
return this._allPaths;
},
set: function (a) {
this._allPaths = a;
},
enumerable: false,
configurable: true
});
DefaultMultiSliderTrackBarVisual.$t = markType(DefaultMultiSliderTrackBarVisual, 'DefaultMultiSliderTrackBarVisual', Base.$, [IMultiSliderTrackBarVisual_$type]);
return DefaultMultiSliderTrackBarVisual;
}(Base));
export { DefaultMultiSliderTrackBarVisual };