igniteui-angular-gauges
Version:
Ignite UI Angular gauge components.
206 lines (205 loc) • 7.3 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 { 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
*/
export let RadialGaugeScaleFrame = /*@__PURE__*/ (() => {
class RadialGaugeScaleFrame extends Base {
constructor() {
super();
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();
}
a(a, b, c, d) {
let e = Math.max(c.length, d.length);
let f = Math.min(c.length, d.length);
if (b.length != e) {
b = new Array(e);
}
let g = 0;
if (c.length > 0) {
g = c[c.length - 1];
}
let h = 0;
if (d.length > 0) {
h = d[d.length - 1];
}
let i = c.length > d.length;
let j = 0;
for (j = 0; j < f; j++) {
b[j] = c[j] + (d[j] - c[j]) * a;
}
let k;
let 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;
}
b(a, b, c, d) {
let e = Math.max(c.length, d.length);
let f = Math.min(c.length, d.length);
if (b.length != e) {
b = new Array(e);
}
let g = null;
if (c.length > 0) {
g = c[c.length - 1];
}
let h = null;
if (d.length > 0) {
h = d[d.length - 1];
}
let i = c.length > d.length;
let j = 0;
for (j = 0; j < f; j++) {
b[j] = d[j];
}
let k;
let 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;
}
af(a, b, c) {
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, () => null, (d, e, f, g) => this.q(d, f, g));
this.d = InterpolationUtil.a(Brush.$, this.d, a, b.d, c.d, () => null, (d, e, f, g) => 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);
}
ag(a, b, c, d) {
InterpolationUtil.e(RadialGaugeRangeFrame.$, b, a, c, d, () => new RadialGaugeRangeFrame(), RadialGaugeRangeFrame.a);
}
ah(a, b, c) {
if (b == null && c == null) {
return null;
}
else {
return BrushUtil.n(b, a, c, 0);
}
}
s(a, b, c) {
return b + (c - b) * a;
}
q(a, b, c) {
let d = new FontInfo();
FontUtil.interpolateFont(d, a, b, c);
return d;
}
n(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;
})();