igniteui-angular-gauges
Version:
Ignite UI Angular gauge components.
421 lines (420 loc) • 13.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, fromEnum, markType } from "igniteui-angular-core";
import { StringBuilder } from "igniteui-angular-core";
/**
* @hidden
*/
export let GaugeVisualData = /*@__PURE__*/ (() => {
class GaugeVisualData extends Base {
constructor() {
super(...arguments);
this._scalePath = null;
this._needlePath = null;
this._highlightNeedlePath = null;
this._backingPath = null;
this._underlayPath = null;
this._overlayPath = null;
this._scale = null;
this._scaleLabels = null;
this._titleLabels = null;
this._subtitleLabels = null;
this._highlightLabels = null;
this._scaleTickmarks = null;
this._needle = null;
this._highlightNeedle = null;
this._ranges = null;
this._name = null;
this._viewport = null;
}
get scalePath() {
return this._scalePath;
}
set scalePath(a) {
this._scalePath = a;
}
get needlePath() {
return this._needlePath;
}
set needlePath(a) {
this._needlePath = a;
}
get highlightNeedlePath() {
return this._highlightNeedlePath;
}
set highlightNeedlePath(a) {
this._highlightNeedlePath = a;
}
get backingPath() {
return this._backingPath;
}
set backingPath(a) {
this._backingPath = a;
}
get underlayPath() {
return this._underlayPath;
}
set underlayPath(a) {
this._underlayPath = a;
}
get overlayPath() {
return this._overlayPath;
}
set overlayPath(a) {
this._overlayPath = a;
}
get scale() {
return this._scale;
}
set scale(a) {
this._scale = a;
}
get scaleLabels() {
return this._scaleLabels;
}
set scaleLabels(a) {
this._scaleLabels = a;
}
get titleLabels() {
return this._titleLabels;
}
set titleLabels(a) {
this._titleLabels = a;
}
get subtitleLabels() {
return this._subtitleLabels;
}
set subtitleLabels(a) {
this._subtitleLabels = a;
}
get highlightLabels() {
return this._highlightLabels;
}
set highlightLabels(a) {
this._highlightLabels = a;
}
get scaleTickmarks() {
return this._scaleTickmarks;
}
set scaleTickmarks(a) {
this._scaleTickmarks = a;
}
get needle() {
return this._needle;
}
set needle(a) {
this._needle = a;
}
get highlightNeedle() {
return this._highlightNeedle;
}
set highlightNeedle(a) {
this._highlightNeedle = a;
}
get ranges() {
return this._ranges;
}
set ranges(a) {
this._ranges = a;
}
get name() {
return this._name;
}
set name(a) {
this._name = a;
}
scaleByViewport() {
if (this.scalePath != null) {
this.scalePath.scaleByViewport(this.viewport);
}
if (this.needlePath != null) {
this.needlePath.scaleByViewport(this.viewport);
}
if (this.highlightNeedlePath != null) {
this.highlightNeedlePath.scaleByViewport(this.viewport);
}
if (this.backingPath != null) {
this.backingPath.scaleByViewport(this.viewport);
}
if (this.underlayPath != null) {
this.underlayPath.scaleByViewport(this.viewport);
}
if (this.overlayPath != null) {
this.overlayPath.scaleByViewport(this.viewport);
}
if (this.scaleLabels != null) {
for (let a of fromEnum(this.scaleLabels)) {
a.scaleByViewport(this.viewport);
}
}
if (this.titleLabels != null) {
for (let b of fromEnum(this.titleLabels)) {
b.scaleByViewport(this.viewport);
}
}
if (this.subtitleLabels != null) {
for (let c of fromEnum(this.subtitleLabels)) {
c.scaleByViewport(this.viewport);
}
}
if (this.highlightLabels != null) {
for (let d of fromEnum(this.highlightLabels)) {
d.scaleByViewport(this.viewport);
}
}
if (this.scaleTickmarks != null) {
for (let e of fromEnum(this.scaleTickmarks)) {
if (e.tickPath != null) {
e.tickPath.scaleByViewport(this.viewport);
}
}
}
if (this.ranges != null) {
for (let f of fromEnum(this.ranges)) {
if (f.rangePath != null) {
f.rangePath.scaleByViewport(this.viewport);
}
}
}
}
serialize() {
let a = new StringBuilder(0);
let b = true;
a.u("{");
if (this.scalePath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("scalePath: ");
a.u(this.scalePath.serialize());
}
if (this.needlePath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("needlePath: ");
a.u(this.needlePath.serialize());
}
if (this.highlightNeedlePath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("highlightNeedlePath: ");
a.u(this.highlightNeedlePath.serialize());
}
if (this.backingPath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("backingPath: ");
a.u(this.backingPath.serialize());
}
if (this.underlayPath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("underlayPath: ");
a.u(this.underlayPath.serialize());
}
if (this.overlayPath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("overlayPath: ");
a.u(this.overlayPath.serialize());
}
if (this.scaleLabels != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let c = true;
a.l("scaleLabels: [");
for (let d of fromEnum(this.scaleLabels)) {
if (c) {
c = false;
}
else {
a.l(", ");
}
a.u(d.serialize());
}
a.u("]");
}
if (this.titleLabels != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let e = true;
a.l("titleLabels: [");
for (let f of fromEnum(this.titleLabels)) {
if (e) {
e = false;
}
else {
a.l(", ");
}
a.u(f.serialize());
}
a.u("]");
}
if (this.subtitleLabels != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let g = true;
a.l("subtitleLabels: [");
for (let h of fromEnum(this.subtitleLabels)) {
if (g) {
g = false;
}
else {
a.l(", ");
}
a.u(h.serialize());
}
a.u("]");
}
if (this.highlightLabels != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let i = true;
a.l("highlightLabels: [");
for (let j of fromEnum(this.highlightLabels)) {
if (i) {
i = false;
}
else {
a.l(", ");
}
a.u(j.serialize());
}
a.u("]");
}
if (this.scaleTickmarks != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let k = true;
a.l("scaleTickmarks: [");
for (let l of fromEnum(this.scaleTickmarks)) {
if (k) {
k = false;
}
else {
a.l(", ");
}
a.u(l.serialize());
}
a.u("]");
}
if (this.needle != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("needle: ");
a.u(this.needle.serialize());
}
if (this.highlightNeedle != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("highlightNeedle: ");
a.u(this.highlightNeedle.serialize());
}
if (this.ranges != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let m = true;
a.l("ranges: [");
for (let n of fromEnum(this.ranges)) {
if (m) {
m = false;
}
else {
a.l(", ");
}
a.u(n.serialize());
}
a.u("]");
}
if (this.name != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("name: '");
a.l(this.name);
a.u("'");
}
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("viewport: {");
a.l("left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height);
a.u("}");
a.u("}");
return a.toString();
}
get viewport() {
return this._viewport;
}
set viewport(a) {
this._viewport = a;
}
}
GaugeVisualData.$t = markType(GaugeVisualData, 'GaugeVisualData');
return GaugeVisualData;
})();