igniteui-angular-gauges
Version:
Ignite UI Angular gauge components.
209 lines (208 loc) • 7.25 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, markType } from "igniteui-angular-core";
import { FontInfo } from "igniteui-angular-core";
import { RadialGaugeScaleFrameLabel } from "./RadialGaugeScaleFrameLabel";
import { Brush } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { RadialGaugeRangeFrame } from "./RadialGaugeRangeFrame";
import { BrushUtil } from "igniteui-angular-core";
import { InterpolationUtil } from "igniteui-angular-core";
import { FontUtil } from "igniteui-angular-core";
/**
* @hidden
*/
var RadialGaugeScaleFrame = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RadialGaugeScaleFrame, _super);
function RadialGaugeScaleFrame() {
var _this = _super.call(this) || this;
_this.l = null;
_this.k = null;
_this.c = null;
_this.g = null;
_this.h = null;
_this.f = null;
_this.i = null;
_this.j = null;
_this.t = 0;
_this.e = null;
_this.o = null;
_this.p = null;
_this.m = null;
_this.ab = 0;
_this.y = 0;
_this.ad = 0;
_this.ac = 0;
_this.v = 0;
_this.u = 0;
_this.aa = 0;
_this.x = 0;
_this.ak = null;
_this.ae = 0;
_this.w = 0;
_this.ai = null;
_this.aj = null;
_this.d = null;
_this.z = 0;
_this.r = null;
_this.r = new List$1(RadialGaugeRangeFrame.$, 0);
_this.l = new Array(0);
_this.k = new Array(0);
_this.c = new Array(0);
_this.g = new Array(0);
_this.h = new Array(0);
_this.f = new Array(0);
_this.i = new Array(0);
_this.j = new Array(0);
_this.e = new Array(0);
_this.d = new Array(0);
_this.o = new RadialGaugeScaleFrameLabel();
_this.p = new RadialGaugeScaleFrameLabel();
_this.m = new RadialGaugeScaleFrameLabel();
return _this;
}
RadialGaugeScaleFrame.prototype.a = function (a, b, c, d) {
var e = Math.max(c.length, d.length);
var f = Math.min(c.length, d.length);
if (b.length != e) {
b = new Array(e);
}
var g = 0;
if (c.length > 0) {
g = c[c.length - 1];
}
var h = 0;
if (d.length > 0) {
h = d[d.length - 1];
}
var i = c.length > d.length;
var j = 0;
for (j = 0; j < f; j++) {
b[j] = c[j] + (d[j] - c[j]) * a;
}
var k;
var l;
for (j = f; j < e; j++) {
if (i) {
k = c[j];
l = h;
}
else {
k = g;
l = d[j];
}
b[j] = k + (l - k) * a;
}
return b;
};
RadialGaugeScaleFrame.prototype.b = function (a, b, c, d) {
var e = Math.max(c.length, d.length);
var f = Math.min(c.length, d.length);
if (b.length != e) {
b = new Array(e);
}
var g = null;
if (c.length > 0) {
g = c[c.length - 1];
}
var h = null;
if (d.length > 0) {
h = d[d.length - 1];
}
var i = c.length > d.length;
var j = 0;
for (j = 0; j < f; j++) {
b[j] = d[j];
}
var k;
var l;
for (j = f; j < e; j++) {
if (i) {
k = c[j];
l = h;
}
else {
k = g;
l = d[j];
}
if (l != null) {
b[j] = l;
}
else {
b[j] = k;
}
}
return b;
};
RadialGaugeScaleFrame.prototype.af = function (a, b, c) {
var _this = this;
this.aj = BrushUtil.n(b.aj, a, c.aj, 0);
this.ak = BrushUtil.n(b.ak, a, c.ak, 0);
this.ai = BrushUtil.n(b.ai, a, c.ai, 0);
this.ab = this.s(a, b.ab, c.ab);
this.y = this.s(a, b.y, c.y);
this.aa = this.s(a, b.aa, c.aa);
this.x = this.s(a, b.x, c.x);
this.z = this.s(a, b.z, c.z);
this.t = this.s(a, b.t, c.t);
this.ad = this.s(a, b.ad, c.ad);
this.ac = this.s(a, b.ac, c.ac);
this.ae = this.s(a, b.ae, c.ae);
this.v = this.s(a, b.v, c.v);
this.u = this.s(a, b.u, c.u);
this.w = this.s(a, b.w, c.w);
this.l = this.a(a, this.l, b.l, c.l);
this.k = this.a(a, this.k, b.k, c.k);
this.c = this.a(a, this.c, b.c, c.c);
this.h = this.a(a, this.h, b.h, c.h);
this.f = this.a(a, this.f, b.f, c.f);
this.i = this.a(a, this.i, b.i, c.i);
this.j = this.a(a, this.j, b.j, c.j);
this.g = this.b(a, this.g, b.g, c.g);
this.e = InterpolationUtil.a(FontInfo.$, this.e, a, b.e, c.e, function () { return null; }, function (d, e, f, g) { return _this.q(d, f, g); });
this.d = InterpolationUtil.a(Brush.$, this.d, a, b.d, c.d, function () { return null; }, function (d, e, f, g) { return _this.ah(d, f, g); });
this.p = this.n(a, b.p, c.p);
this.o = this.n(a, b.o, c.o);
this.m = this.n(a, b.m, c.m);
this.ag(a, this.r, b.r, c.r);
};
RadialGaugeScaleFrame.prototype.ag = function (a, b, c, d) {
InterpolationUtil.d(RadialGaugeRangeFrame.$, b, a, c, d, function () { return new RadialGaugeRangeFrame(); }, RadialGaugeRangeFrame.a);
};
RadialGaugeScaleFrame.prototype.ah = function (a, b, c) {
if (b == null && c == null) {
return null;
}
else {
return BrushUtil.n(b, a, c, 0);
}
};
RadialGaugeScaleFrame.prototype.s = function (a, b, c) {
return b + (c - b) * a;
};
RadialGaugeScaleFrame.prototype.q = function (a, b, c) {
var d = new FontInfo();
FontUtil.interpolateFont(d, a, b, c);
return d;
};
RadialGaugeScaleFrame.prototype.n = function (a, b, c) {
b.i = this.ah(a, b.i, c.i);
b.c = this.s(a, b.c, c.c);
b.b = this.s(a, b.b, c.b);
b.f = this.s(a, b.f, c.f);
b.g = this.s(a, b.g, c.g);
b.e = this.s(a, b.e, c.e);
b.d = this.s(a, b.d, c.d);
b.h = c.h;
b.a = this.q(a, b.a, c.a);
return b;
};
RadialGaugeScaleFrame.$t = markType(RadialGaugeScaleFrame, 'RadialGaugeScaleFrame');
return RadialGaugeScaleFrame;
}(Base));
export { RadialGaugeScaleFrame };