igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
213 lines (212 loc) • 7.77 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 { __extends } from "tslib";
import { Base, Point_$type, markType } from "igniteui-angular-core";
import { ITrackThumbCalloutVisual_$type } from "./ITrackThumbCalloutVisual";
import { Path } from "igniteui-angular-core";
import { TextBlock } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
import { PathGeometry } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { PolyLineSegment } from "igniteui-angular-core";
/**
* @hidden
*/
var DefaultTrackThumbCalloutVisual = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DefaultTrackThumbCalloutVisual, _super);
function DefaultTrackThumbCalloutVisual() {
var _this = _super.call(this) || this;
_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 = "";
return _this;
}
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "translateX", {
get: function () {
return this._translateX;
},
set: function (a) {
this._translateX = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "translateY", {
get: function () {
return this._translateY;
},
set: function (a) {
this._translateY = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "textTranslateX", {
get: function () {
return this._textTranslateX;
},
set: function (a) {
this._textTranslateX = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "textTranslateY", {
get: function () {
return this._textTranslateY;
},
set: function (a) {
this._textTranslateY = a;
},
enumerable: false,
configurable: true
});
DefaultTrackThumbCalloutVisual.prototype.getCalloutBoxDefaultStroke = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(255, 185, 185, 185);
return $ret;
})());
};
DefaultTrackThumbCalloutVisual.prototype.getCalloutBoxDefaultStrokeThickness = function () {
return 1;
};
DefaultTrackThumbCalloutVisual.prototype.getCalloutBoxDefaultBrush = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(200, 255, 255, 255);
return $ret;
})());
};
DefaultTrackThumbCalloutVisual.prototype.getCalloutTextDefaultBrush = function () {
return ((function () {
var $ret = new Brush();
$ret.color = Color.u(255, 185, 185, 185);
return $ret;
})());
};
DefaultTrackThumbCalloutVisual.prototype.e = function () {
};
DefaultTrackThumbCalloutVisual.prototype.d = function () {
var a = new PathGeometry();
var b = new PathFigure();
var 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;
};
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "width", {
get: function () {
return this.c;
},
set: function (a) {
var b = this.c;
this.c = a;
if (b != this.c) {
this.f();
}
},
enumerable: false,
configurable: true
});
DefaultTrackThumbCalloutVisual.prototype.f = function () {
if (this.width > 0 && this.height > 0) {
this.e();
this.d();
}
};
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "height", {
get: function () {
return this.b;
},
set: function (a) {
var b = this.b;
this.b = a;
if (this.b != b) {
this.f();
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "isVisible", {
get: function () {
return this.a;
},
set: function (a) {
var b = this.a;
this.a = a;
if (this.a != b) {
this.calloutBox._visibility = this.a ? 0 : 1;
this.calloutText._visibility = this.a ? 0 : 1;
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "calloutBox", {
get: function () {
return this._calloutBox;
},
set: function (a) {
this._calloutBox = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "calloutText", {
get: function () {
return this._calloutText;
},
set: function (a) {
this._calloutText = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "allPaths", {
get: function () {
return this._allPaths;
},
set: function (a) {
this._allPaths = a;
},
enumerable: false,
configurable: true
});
DefaultTrackThumbCalloutVisual.$t = markType(DefaultTrackThumbCalloutVisual, 'DefaultTrackThumbCalloutVisual', Base.$, [ITrackThumbCalloutVisual_$type]);
return DefaultTrackThumbCalloutVisual;
}(Base));
export { DefaultTrackThumbCalloutVisual };