UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

91 lines (90 loc) 2.98 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, markType } from "igniteui-react-core"; import { StringBuilder } from "igniteui-react-core"; /** * @hidden */ export let CalloutVisualData = /*@__PURE__*/ (() => { class CalloutVisualData extends Base { constructor() { super(...arguments); this._background = null; this._text = null; this._line = null; this._left = 0; this._top = 0; this._marginLeft = 0; this._marginTop = 0; } get background() { return this._background; } set background(a) { this._background = a; } get text() { return this._text; } set text(a) { this._text = a; } get line() { return this._line; } set line(a) { this._line = a; } get left() { return this._left; } set left(a) { this._left = a; } get top() { return this._top; } set top(a) { this._top = a; } get marginLeft() { return this._marginLeft; } set marginLeft(a) { this._marginLeft = a; } get marginTop() { return this._marginTop; } set marginTop(a) { this._marginTop = a; } serialize() { let a = new StringBuilder(0); a.u("{"); a.u("left: " + this.left.toString() + ","); a.u("top: " + this.top.toString() + ","); a.u("marginLeft: " + this.marginLeft.toString() + ","); a.u("marginTop: " + this.marginTop.toString() + ","); a.u("background: " + this.background.serialize() + ","); a.u("text: " + this.text.serialize() + ","); a.u("line: " + this.line.serialize()); a.u("}"); return a.toString(); } scaleByViewport(a) { this.left = (this.left - a.left) / a.width; this.top = (this.top - a.top) / a.height; this.marginLeft = this.marginLeft / a.width; this.marginTop = this.marginTop / a.height; this.background.scaleByViewport(a); this.line.scaleByViewport(a); } } CalloutVisualData.$t = /*@__PURE__*/ markType(CalloutVisualData, 'CalloutVisualData'); return CalloutVisualData; })();