igniteui-react-grids
Version:
Ignite UI React grid components.
101 lines (100 loc) • 3.43 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 { 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
*/
var CanvasSummaryCell = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CanvasSummaryCell, _super);
function CanvasSummaryCell(a) {
var _this = _super.call(this, a) || this;
_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);
return _this;
}
CanvasSummaryCell.prototype.cu = function (a) {
_super.prototype.cu.call(this, a);
this.bk = intDivide(a, 2);
this.dc = true;
};
CanvasSummaryCell.prototype.dl = function (a) {
this.da = a;
this.db = true;
this.ad = true;
this.dc = true;
};
CanvasSummaryCell.prototype.dj = function (a) {
this.di = a;
this.dn.al = this.di;
this.ad = true;
this.dc = true;
};
CanvasSummaryCell.prototype.dk = function (a) {
this.ad = true;
this.dn.ao = ((function () {
var $ret = new Brush();
$ret.color = a;
return $ret;
})());
};
CanvasSummaryCell.prototype.dm = function (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);
}
var b = this.bo;
var 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));
};
CanvasSummaryCell.prototype.cc = function (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.prototype.cc.call(this, a);
};
CanvasSummaryCell.prototype.get_af = function () {
return false;
};
CanvasSummaryCell.$t = markType(CanvasSummaryCell, 'CanvasSummaryCell', CanvasGridCellBase.$);
return CanvasSummaryCell;
}(CanvasGridCellBase));
export { CanvasSummaryCell };