igniteui-react-inputs
Version:
Ignite UI React input components.
171 lines (170 loc) • 5.86 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, Point_$type, markType } from "igniteui-react-core";
import { IMultiSliderTrackThumbCalloutVisual_$type } from "./IMultiSliderTrackThumbCalloutVisual";
import { Path } from "igniteui-react-core";
import { TextBlock } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { PathFigure } from "igniteui-react-core";
import { PolyLineSegment } from "igniteui-react-core";
/**
* @hidden
*/
export let DefaultMultiSliderTrackThumbCalloutVisual = /*@__PURE__*/ (() => {
class DefaultMultiSliderTrackThumbCalloutVisual extends Base {
get translateX() {
return this._translateX;
}
set translateX(a) {
this._translateX = a;
}
get translateY() {
return this._translateY;
}
set translateY(a) {
this._translateY = a;
}
get textTranslateX() {
return this._textTranslateX;
}
set textTranslateX(a) {
this._textTranslateX = a;
}
get textTranslateY() {
return this._textTranslateY;
}
set textTranslateY(a) {
this._textTranslateY = a;
}
constructor() {
super();
this._translateX = 0;
this._translateY = 0;
this._textTranslateX = 0;
this._textTranslateY = 0;
this.c = -1;
this.b = -1;
this.a = false;
this._calloutBox = null;
this._calloutText = null;
this._allPaths = null;
this.calloutBox = new Path();
this.calloutBox._visibility = 1;
this.calloutText = new TextBlock();
this.calloutText._visibility = 1;
this.allPaths = new List$1(Path.$, 0);
this.allPaths.add(this.calloutBox);
this.height = 22;
this.width = 10;
this.calloutBox._stroke = this.getCalloutBoxDefaultStroke();
this.calloutBox.ad = this.getCalloutBoxDefaultStrokeThickness();
this.calloutBox._fill = this.getCalloutBoxDefaultBrush();
this.calloutText.ao = this.getCalloutTextDefaultBrush();
this.calloutText.al = "";
}
getCalloutBoxDefaultStroke() {
return ((() => {
let $ret = new Brush();
$ret.color = Color.u(255, 185, 185, 185);
return $ret;
})());
}
getCalloutBoxDefaultStrokeThickness() {
return 1;
}
getCalloutBoxDefaultBrush() {
return ((() => {
let $ret = new Brush();
$ret.color = Color.u(200, 255, 255, 255);
return $ret;
})());
}
getCalloutTextDefaultBrush() {
return ((() => {
let $ret = new Brush();
$ret.color = Color.u(255, 185, 185, 185);
return $ret;
})());
}
e() {
}
d() {
let a = new PathGeometry();
let b = new PathFigure();
let c = new PolyLineSegment();
b._isClosed = true;
b._isFilled = true;
b._startPoint = { $type: Point_$type, x: 0, y: 0 };
c._points.add({ $type: Point_$type, x: this.width, y: 0 });
c._points.add({ $type: Point_$type, x: this.width, y: this.height });
c._points.add({ $type: Point_$type, x: 0, y: this.height });
b._segments.add(c);
a.c.add(b);
this.calloutBox.an = a;
}
get width() {
return this.c;
}
set width(a) {
let b = this.c;
this.c = a;
if (b != this.c) {
this.f();
}
}
f() {
if (this.width > 0 && this.height > 0) {
this.e();
this.d();
}
}
get height() {
return this.b;
}
set height(a) {
let b = this.b;
this.b = a;
if (this.b != b) {
this.f();
}
}
get isVisible() {
return this.a;
}
set isVisible(a) {
let b = this.a;
this.a = a;
if (this.a != b) {
this.calloutBox._visibility = this.a ? 0 : 1;
this.calloutText._visibility = this.a ? 0 : 1;
}
}
get calloutBox() {
return this._calloutBox;
}
set calloutBox(a) {
this._calloutBox = a;
}
get calloutText() {
return this._calloutText;
}
set calloutText(a) {
this._calloutText = a;
}
get allPaths() {
return this._allPaths;
}
set allPaths(a) {
this._allPaths = a;
}
}
DefaultMultiSliderTrackThumbCalloutVisual.$t = /*@__PURE__*/ markType(DefaultMultiSliderTrackThumbCalloutVisual, 'DefaultMultiSliderTrackThumbCalloutVisual', Base.$, [IMultiSliderTrackThumbCalloutVisual_$type]);
return DefaultMultiSliderTrackThumbCalloutVisual;
})();