Commit d230f2bc authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

fillGlyph в отдельную функию

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53907 954022d7-b5bf-4e40-9824-e11837661b57
parent 7e8ed194
......@@ -840,9 +840,7 @@ DrawingContext.prototype = {
return Height * setUpSize / UnitsPerEm;
},
fillText: function (text, x, y, maxWidth, charWidths, angle) {
var t = this;
function fillGlyph(pGlyph,fmgr) {
fillGlyph: function (pGlyph, fmgr) {
var nW = pGlyph.oBitmap.nWidth;
var nH = pGlyph.oBitmap.nHeight;
......@@ -851,9 +849,9 @@ DrawingContext.prototype = {
var nX = asc_floor(fmgr.m_oGlyphString.m_fX + pGlyph.fX + pGlyph.oBitmap.nX);
var nY = asc_floor(fmgr.m_oGlyphString.m_fY + pGlyph.fY - pGlyph.oBitmap.nY);
var _r = t.fillColor.r;
var _g = t.fillColor.g;
var _b = t.fillColor.b;
var _r = this.fillColor.r;
var _g = this.fillColor.g;
var _b = this.fillColor.b;
if (window.g_isMobileVersion) {
// Special for iPad (5.1)
......@@ -882,8 +880,9 @@ DrawingContext.prototype = {
pGlyph.oBitmap.oGlyphData.checkColor(_r, _g, _b, nW, nH);
pGlyph.oBitmap.draw(this.ctx, nX, nY);
}
}
},
fillText: function (text, x, y, maxWidth, charWidths, angle) {
var manager = angle ? this.fmgrGraphics[1] : this.fmgrGraphics[0];
var _x = this._mift.transformPointX(x, y);
......@@ -899,7 +898,7 @@ DrawingContext.prototype = {
var pGlyph = manager.m_oGlyphString.m_pGlyphsBuffer[0];
if (null === pGlyph || null === pGlyph.oBitmap) {continue;}
fillGlyph.call(this, pGlyph,manager);
this.fillGlyph(pGlyph, manager);
}
return this;
......
......@@ -1266,8 +1266,7 @@
if (1 === fullRecalc) {
this.cols = [];
}
else if (2 === fullRecalc) {
} else if (2 === fullRecalc) {
i = this.cols.length;
x = this.cols[i - 1].left + this.cols[i - 1].width;
}
......@@ -1527,8 +1526,7 @@
maxCols = Math.max (maxCols, maxObjectsCoord.maxCol);
maxRows = Math.max (maxRows, maxObjectsCoord.maxRow);
}
}
else {
} else {
maxCols = activeRange.c2 + 1;
maxRows = activeRange.r2 + 1;
range = asc_Range(0, 0, maxCols, maxRows);
......@@ -1653,8 +1651,7 @@
bIsAddOffset = true;
++colIndex;
break;
}
else
} else
bIsAddOffset = false;
}
isCalcColumnsWidth = false;
......@@ -1713,8 +1710,7 @@
if (colIndex < maxCols) {
currentColIndex = colIndex;
currentHeight = 0;
}
else {
} else {
// Мы дошли до конца отрисовки
currentColIndex = colIndex;
currentRowIndex = rowIndex;
......@@ -2094,8 +2090,7 @@
ctx.setFillStyle(st.color)
.fillText(text, textX, textY + tm.baseline, undefined, sr.charWidths);
ctx.RemoveClipRect();
}
else {
} else {
ctx.save()
.beginPath()
.rect(x, y, w, h)
......@@ -3896,11 +3891,9 @@
}
if (bUpdateScrollX && bUpdateScrollY) {
this.handlers.trigger("reinitializeScroll");
}
else if (bUpdateScrollX) {
} else if (bUpdateScrollX) {
this.handlers.trigger("reinitializeScrollX");
}
else if (bUpdateScrollY) {
} else if (bUpdateScrollY) {
this.handlers.trigger("reinitializeScrollY");
}
......@@ -3980,8 +3973,7 @@
maxWidth: maxW - this.cols[col].innerWidth + this.cols[col].width,
leftSide: 0,
rightSide: 0
} :
this._calcCellTextOffset(col, row, ha, tm.width);
} : this._calcCellTextOffset(col, row, ha, tm.width);
// check right side of cell text and append columns if it exceeds existing cells borders
if (!fl.isMerged) {
......
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