igniteui-react-grids
Version:
Ignite UI React grid components.
99 lines (98 loc) • 3.25 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 { CanvasGridCellBase } from "./CanvasGridCellBase";
import { TextBlock } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { FontUtil } from "igniteui-react-core";
import { markType } from "igniteui-react-core";
import { intDivide } from "igniteui-react-core";
/**
* @hidden
*/
export let CanvasSummaryCell = /*@__PURE__*/ (() => {
class CanvasSummaryCell extends CanvasGridCellBase {
constructor(a) {
super(a);
this.di = null;
this.dn = new TextBlock();
this.de = 0;
this.df = 0;
this.dd = 0;
this.da = null;
this.dh = 0;
this.db = false;
this.dc = true;
this.dg = 0;
this.cl(2);
}
cu(a) {
super.cu(a);
this.bk = intDivide(a, 2);
this.dc = true;
}
dl(a) {
this.da = a;
this.db = true;
this.ad = true;
this.dc = true;
}
dj(a) {
this.di = a;
this.dn.al = this.di;
this.ad = true;
this.dc = true;
}
dk(a) {
this.ad = true;
this.dn.ao = ((() => {
let $ret = new Brush();
$ret.color = a;
return $ret;
})());
}
dm(a) {
if (this.dn.al == null) {
return;
}
if (a == null) {
return;
}
if (this.db || (this.da != null && this.da.j != this.dh)) {
this.db = false;
this.dh = this.da.j;
a.ad(this.da);
this.dd = FontUtil.getCurrentFontHeight(this.bq, this.da);
}
let b = this.bo;
let c = this.bd;
b -= (this.ba + this.bf + this.bb + this.bg);
c -= (this.bc + this.bh + this.a9 + this.be);
b = Math.max(b, 0);
c = Math.max(c, 0);
this.dg = this.bn(this.dn, this.di, b / 2, a);
this.de = this.bf + this.ba;
this.df = this.bh + this.bc + ((c / 2) - (this.dd / 2));
}
cc(a) {
if (this.dn.al != null) {
if (this.dc) {
this.dm(a);
this.dc = false;
}
this.dn.n = this.de;
this.dn.o = this.df;
a.x(this.dn);
}
super.cc(a);
}
get_af() {
return false;
}
}
CanvasSummaryCell.$t = /*@__PURE__*/ markType(CanvasSummaryCell, 'CanvasSummaryCell', CanvasGridCellBase.$);
return CanvasSummaryCell;
})();