UNPKG

igniteui-webcomponents-inputs

Version:

Ignite UI Web Components inputs components.

298 lines (297 loc) 8.47 kB
/* 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, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox, markType } from "igniteui-webcomponents-core"; import { MultiSliderThumbRangePosition_$type } from "./MultiSliderThumbRangePosition"; import { PropertyUpdatedEventArgs } from "igniteui-webcomponents-core"; /** * @hidden */ export let MultiSliderThumb = /*@__PURE__*/ (() => { class MultiSliderThumb extends Base { constructor() { super(...arguments); this.m = 0; this.o = 0; this.f = 1; this.h = null; this.d = null; this.l = 0; this.n = 0; this.j = false; this.k = false; this.propertyUpdated = null; this.propertyChanged = null; this.c = null; this.b = null; } get e() { return this.d; } set e(a) { let b = this.d; this.d = a; if (b != this.d) { this.u("Owner", b, this.d); } } u(a, b, c) { this.v(a, b, c); if (this.propertyUpdated != null) { this.propertyUpdated(this, new PropertyUpdatedEventArgs(a, b, c)); } if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } } v(a, b, c) { if (this.e != null) { if (a == "Position") { this.j = true; this.p = this.e.updateActualPosition(b, c); if (!this.k) { this.s = this.e.updateThumbValue(this.p); } this.j = false; } if (a == "Value") { this.k = true; if (!this.j) { this.q = this.e.updateThumbPosition(this.s); this.p = this.e.updateActualPosition(this.q, this.q); } this.e.onThumbValueUpdated(this, b, c); this.k = false; } } this.t(); } r(a) { if (this.q + a > 1) { a = 1 - this.q; } if (this.q + a < 0) { a = -this.q; } if (this.i != null) { if (this.g == 0) { a = this.i.q(a); } else { a = this.i.p(a); } } this.q += a; return a; } t() { if (this.e == null) { return; } this.e.trackDirty(); } get q() { return this.m; } set q(a) { let b = this.m; this.m = a; if (b != this.m) { this.u("Position", b, this.m); } } get p() { return this.l; } set p(a) { let b = this.l; this.l = a; if (b != this.l) { this.u("ActualPosition", b, this.l); } } get s() { return this.n; } set s(a) { let b = this.n; this.n = a; if (b != this.n) { this.u("Value", b, this.n); } } get g() { return this.f; } set g(a) { let b = this.f; this.f = a; if (b != this.f) { this.u("RangePosition", enumGetBox(MultiSliderThumbRangePosition_$type, b), enumGetBox(MultiSliderThumbRangePosition_$type, this.f)); } } get i() { return this.h; } set i(a) { let b = this.h; this.h = a; if (b != this.h) { this.u("Range", b, this.h); } } } MultiSliderThumb.$t = /*@__PURE__*/ markType(MultiSliderThumb, 'MultiSliderThumb', Base.$, [INotifyPropertyChanged_$type]); return MultiSliderThumb; })(); /** * @hidden */ export let MultiSliderTrackThumbRange = /*@__PURE__*/ (() => { class MultiSliderTrackThumbRange extends Base { constructor() { super(...arguments); this.i = 0; this.j = 0; this.h = 0; this.g = 1; this.d = null; this.c = null; this.a = null; this.propertyChanged = null; } t(a, b, c) { this.u(a, b, c); if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } } u(a, b, c) { this.s(); } s() { if (this.b == null) { return; } this.b.trackDirty(); } get b() { return this.a; } set b(a) { let b = this.a; this.a = a; if (b != this.a) { this.t("Owner", b, this.a); } } get n() { return this.i; } set n(a) { let b = this.i; this.i = a; if (b != this.i) { this.t("Position", b, this.i); } } o(a) { if (a > 0 && this.n + (this.r / 2) + a > 1) { a = 1 - (this.n + (this.r / 2)); } if (a < 0 && (this.n - (this.r / 2)) + a < 0) { a = (this.n - (this.r / 2)) * -1; } this.f.q += a; this.e.q += a; this.n += a; return a; } p(a) { a = this.k(a); let b = this.n - this.r / 2; this.r += a; this.n = b + this.r / 2; return a; } k(a) { if (a < 0) { let b = this.r + a; if (b < this.m) { b = this.m; a = (b - this.r); } } if (a > 0) { let c = this.r + a; if (c > this.l) { c = this.l; a = (c - this.r); } } return a; } q(a) { a = -1 * this.k(a * -1); let b = this.n + this.r / 2; this.r -= a; this.n = b - this.r / 2; return a; } get r() { return this.j; } set r(a) { let b = this.j; this.j = a; if (b != this.j) { this.t("Width", b, this.j); } } get m() { return this.h; } set m(a) { let b = this.h; this.h = a; if (b != this.h) { this.t("MinWidth", b, this.h); } } get l() { return this.g; } set l(a) { let b = this.g; this.g = a; if (b != this.g) { this.t("MaxWidth", b, this.g); } } get f() { return this.d; } set f(a) { let b = this.d; this.d = a; if (b != this.d) { this.t("LowerThumb", b, this.d); } } get e() { return this.c; } set e(a) { let b = this.c; this.c = a; if (b != this.c) { this.t("HigherThumb", b, this.c); } } } MultiSliderTrackThumbRange.$t = /*@__PURE__*/ markType(MultiSliderTrackThumbRange, 'MultiSliderTrackThumbRange', Base.$, [INotifyPropertyChanged_$type]); return MultiSliderTrackThumbRange; })();