UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

60 lines (59 loc) 2.27 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 { NativeUIElementBridge } from "./NativeUIElementBridge"; import { markType } from "./type"; import { FontInfo } from "./FontInfo"; import { LabelVisualModelExport } from "./LabelVisualModelExport"; /** * @hidden */ export let SpanBridge = /*@__PURE__*/ (() => { class SpanBridge extends NativeUIElementBridge { addHandler(a, b, c, d) { } getValue(a, b) { switch (b) { case 10: return a.getText(); case 31: return a.getStyleProperty("white-space") != "nowrap"; case 11: let c = new FontInfo(); c.fontString = a.getStyleProperty("font"); return c; } return super.getValue(a, b); } removeHandler(a, b, c, d) { } setValue(a, b, c) { super.setValue(a, b, c); switch (b) { case 10: a.setText(c); break; case 11: a.setStyleProperty("font", c.fontString); break; case 31: a.setStyleProperty("white-space", c ? "normal" : "nowrap"); break; } } exportVisualData(a) { let b = new LabelVisualModelExport(); let c = this.getBoundingRect(a); b.a = this.getValue(a, 31); b.f = this.getValue(a, 10); b.c = c.left; b.d = c.top; b.e = c.width; b.b = c.height; return b; } } SpanBridge.$t = markType(SpanBridge, 'SpanBridge', NativeUIElementBridge.$); return SpanBridge; })();