igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
235 lines (234 loc) • 8.63 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-angular-core";
import { ITrackThumbVisual_$type } from "./ITrackThumbVisual";
import { Path } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
import { PathGeometry } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { LineSegment } from "igniteui-angular-core";
import { PolyLineSegment } from "igniteui-angular-core";
/**
* @hidden
*/
var DefaultTrackThumbVisual = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DefaultTrackThumbVisual, _super);
function DefaultTrackThumbVisual() {
var _this = _super.call(this) || this;
_this._translateX = 0;
_this._translateY = 0;
_this.c = -1;
_this.a = 0;
_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.width = _this.getTrackThumbDefaultWidth();
_this.height = _this.getTrackThumbDefaultHeight();
_this.thumbBox._stroke = _this.getThumbBoxDefaultStroke();
_this.thumbBox.ad = _this.getThumbBoxDefaultStrokeThickness();
_this.thumbBox._fill = _this.getThumbBoxDefaultBrush();
_this.thumbRidges._stroke = _this.getThumbRidgesDefaultStroke();
_this.thumbRidges.ad = 1;
return _this;
}
Object.defineProperty(DefaultTrackThumbVisual.prototype, "translateX", {
get: function () {
return this._translateX;
},
set: function (a) {
this._translateX = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbVisual.prototype, "translateY", {
get: function () {
return this._translateY;
},
set: function (a) {
this._translateY = a;
},
enumerable: false,
configurable: true
});
DefaultTrackThumbVisual.prototype.getTrackThumbDefaultWidth = function () {
return 10;
};
DefaultTrackThumbVisual.prototype.getTrackThumbDefaultHeight = function () {
return 22;
};
DefaultTrackThumbVisual.prototype.getThumbBoxDefaultStroke = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(255, 185, 185, 185);
return $ret;
})());
};
DefaultTrackThumbVisual.prototype.getThumbBoxDefaultStrokeThickness = function () {
return 1;
};
DefaultTrackThumbVisual.prototype.getThumbBoxDefaultBrush = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(255, 249, 249, 249);
return $ret;
})());
};
DefaultTrackThumbVisual.prototype.getThumbRidgesDefaultStroke = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(255, 119, 119, 119);
return $ret;
})());
};
DefaultTrackThumbVisual.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: -1.5, y: -4 };
c.c = { $type: Point_$type, x: -1.5, y: 4 };
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: 1.5, y: -4 };
e.c = { $type: Point_$type, x: 1.5, y: 4 };
d._segments.add(e);
a.c.add(d);
this.thumbRidges.an = a;
}
else {
var f = new PathGeometry();
var g = new PathFigure();
var h = new LineSegment(1);
g._isClosed = false;
g._isFilled = false;
g._startPoint = { $type: Point_$type, x: -4, y: -1.5 };
h.c = { $type: Point_$type, x: 4, y: -1.5 };
g._segments.add(h);
f.c.add(g);
var i = new PathFigure();
var j = new LineSegment(1);
i._isClosed = false;
i._isFilled = false;
i._startPoint = { $type: Point_$type, x: -4, y: 1.5 };
j.c = { $type: Point_$type, x: 4, y: 1.5 };
i._segments.add(j);
f.c.add(i);
this.thumbRidges.an = f;
}
};
DefaultTrackThumbVisual.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(DefaultTrackThumbVisual.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
});
DefaultTrackThumbVisual.prototype.f = function () {
if (this.width > 0 && this.height > 0) {
this.d();
this.e();
}
};
Object.defineProperty(DefaultTrackThumbVisual.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(DefaultTrackThumbVisual.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(DefaultTrackThumbVisual.prototype, "thumbBox", {
get: function () {
return this._thumbBox;
},
set: function (a) {
this._thumbBox = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbVisual.prototype, "thumbRidges", {
get: function () {
return this._thumbRidges;
},
set: function (a) {
this._thumbRidges = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbVisual.prototype, "allPaths", {
get: function () {
return this._allPaths;
},
set: function (a) {
this._allPaths = a;
},
enumerable: false,
configurable: true
});
DefaultTrackThumbVisual.$t = markType(DefaultTrackThumbVisual, 'DefaultTrackThumbVisual', Base.$, [ITrackThumbVisual_$type]);
return DefaultTrackThumbVisual;
}(Base));
export { DefaultTrackThumbVisual };