igniteui-angular-gauges
Version:
Ignite UI Angular gauge components.
57 lines (56 loc) • 1.84 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";
/**
* @hidden
*/
export let LinearGraphScaler = /*@__PURE__*/ (() => {
class LinearGraphScaler extends Base {
constructor(a, b, c, d, e) {
super();
this.f = 0;
this.e = 0;
this.d = 0;
this.c = 0;
this.a = false;
this.g = 0;
this.b = 0;
this.f = c;
this.e = d;
this.a = e;
this.d = a;
this.c = b;
this.g = c;
this.b = d;
}
get j() {
return this.g;
}
get h() {
return this.b;
}
i(a) {
let b = (a - this.d) / (this.c - this.d);
if (this.a) {
b = 1 - b;
}
let c = this.g + (this.b - this.g) * b;
c = Math.round(c * 100) / 100;
return c;
}
k(a) {
let b = (a - this.g) / (this.b - this.g);
if (this.a) {
b = 1 - b;
}
let c = this.d + (this.c - this.d) * b;
return c;
}
}
LinearGraphScaler.$t = markType(LinearGraphScaler, 'LinearGraphScaler');
return LinearGraphScaler;
})();