Commit e9af6664 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander.Trofimov

[ios] tables

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62970 954022d7-b5bf-4e40-9824-e11837661b57
parent 7b7f2625
window["Asc"].WorksheetView = WorksheetView;
WorksheetView.prototype._drawColumnHeaders_Local = function (drawingCtx, start, end, style, offsetXForDraw, offsetYForDraw) {
if (undefined === drawingCtx && false === this.model.sheetViews[0].asc_getShowRowColHeaders())
return;
var vr = this.visibleRange;
var c = this.cols;
var offsetX = (undefined !== offsetXForDraw) ? offsetXForDraw : c[vr.c1].left - this.cellsLeft;
var offsetY = (undefined !== offsetYForDraw) ? offsetYForDraw : this.headersTop;
if (undefined === drawingCtx && this.topLeftFrozenCell && undefined === offsetXForDraw) {
var cFrozen = this.topLeftFrozenCell.getCol0();
if (start < vr.c1)
offsetX = c[0].left - this.cellsLeft;
else
offsetX -= c[cFrozen].left - c[0].left;
}
if (asc_typeof(start) !== "number") {start = vr.c1;}
if (asc_typeof(end) !== "number") {end = vr.c2;}
if (style === undefined) {style = kHeaderDefault;}
this._setFont(drawingCtx, this.model.getDefaultFontName(), this.model.getDefaultFontSize());
var ctx = (drawingCtx) ? drawingCtx : this.drawingCtx;
var st = this.settings.header.style[style];
ctx.setFillStyle(st.border)
.fillRect( - offsetX, offsetY, c[end].left - c[start].left, this.headersHeight * 2);
// draw column headers
for (var i = start; i <= end; ++i) {
this._drawHeader(drawingCtx, c[i].left - c[start].left - offsetX, offsetY,
c[i].width, this.headersHeight, style, true, i);
}
};
WorksheetView.prototype._drawRowHeaders_Local = function (drawingCtx, start, end, style, offsetXForDraw, offsetYForDraw) {
if (undefined === drawingCtx && false === this.model.sheetViews[0].asc_getShowRowColHeaders())
return;
var vr = this.visibleRange;
var r = this.rows;
var offsetX = (undefined !== offsetXForDraw) ? offsetXForDraw : this.headersLeft;
var offsetY = (undefined !== offsetYForDraw) ? offsetYForDraw : r[vr.r1].top - this.cellsTop;
if (undefined === drawingCtx && this.topLeftFrozenCell && undefined === offsetYForDraw) {
var rFrozen = this.topLeftFrozenCell.getRow0();
if (start < vr.r1)
offsetY = r[0].top - this.cellsTop;
else
offsetY -= r[rFrozen].top - r[0].top;
}
if (asc_typeof(start) !== "number") {start = vr.r1;}
if (asc_typeof(end) !== "number") {end = vr.r2;}
if (style === undefined) {style = kHeaderDefault;}
this._setFont(drawingCtx, this.model.getDefaultFontName(), this.model.getDefaultFontSize());
var ctx = (drawingCtx) ? drawingCtx : this.drawingCtx;
var st = this.settings.header.style[style];
ctx.setFillStyle(st.border)
.fillRect(offsetX, -offsetY, this.headersWidth * 2, r[end].top - r[start].top);
// draw row headers
for (var i = start; i <= end; ++i) {
this._drawHeader(drawingCtx, offsetX, r[i].top - r[start].top - offsetY,
this.headersWidth, r[i].height, style, false, i);
}
};
WorksheetView.prototype._drawGrid_Local = function (drawingCtx, c1, r1, c2, r2, leftFieldInPt, topFieldInPt, width, height) {
this._drawGrid(drawingCtx, new asc_Range(c1, r1, c2, r2), leftFieldInPt, topFieldInPt, width, height);
};
WorksheetView.prototype._drawCellsAndBorders_Local = function (drawingCtx, c1, r1, c2, r2, offsetXForDraw, offsetYForDraw) {
this._drawCellsAndBorders(drawingCtx, new asc_Range(c1, r1, c2, r2), offsetXForDraw, offsetYForDraw);
};
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment