Commit 88804893 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

Поправила тильду : уменьшила минимальный размер тильды + растяжение (максимум в 2 раза)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58541 954022d7-b5bf-4e40-9824-e11837661b57
parent b75988be
...@@ -233,6 +233,15 @@ CAccentTilde.prototype.calcSize = function(stretch) ...@@ -233,6 +233,15 @@ CAccentTilde.prototype.calcSize = function(stretch)
var width = 9.047509765625*betta; // реальная на отрисовке width 7.495282031249999 var width = 9.047509765625*betta; // реальная на отрисовке width 7.495282031249999
var height = 2.469444444444444*betta; var height = 2.469444444444444*betta;
var augm = 0.9*stretch/width;
if(augm < 1)
augm = 1;
else if (augm > 2)
augm = 2;
width *= augm;
return {width: width, height: height}; return {width: width, height: height};
} }
CAccentTilde.prototype.calcCoord = function(stretch) CAccentTilde.prototype.calcCoord = function(stretch)
...@@ -276,15 +285,19 @@ CAccentTilde.prototype.calcCoord = function(stretch) ...@@ -276,15 +285,19 @@ CAccentTilde.prototype.calcCoord = function(stretch)
var textScale = fontSize/1000, // 1000 pt var textScale = fontSize/1000, // 1000 pt
alpha = textScale*25.4/96 /64 ; // g_dKoef_px_to_mm = 25.4/96 alpha = textScale*25.4/96 /64 ; // g_dKoef_px_to_mm = 25.4/96
var Width = stretch/alpha;
var augm = Width/X[13] * 0.5;
for(var i = 0; i < X.length; i++) for(var i = 0; i < X.length; i++)
{ {
XX[i] = X[i]*alpha; XX[i] = X[i]*alpha*augm;
YY[i] = (Y[5] - Y[i])*alpha*0.65; // сжали ! YY[i] = (Y[5] - Y[i])*alpha*0.65; // сжали !
} }
var W = XX[13], var H = YY[5];
H = YY[5]; var W = XX[13];
return {XX: XX, YY: YY, W: W, H: H}; return {XX: XX, YY: YY, W: W, H: H};
} }
......
...@@ -3038,12 +3038,10 @@ COperator.prototype.fixSize = function(ParaMath, oMeasure, stretch) ...@@ -3038,12 +3038,10 @@ COperator.prototype.fixSize = function(ParaMath, oMeasure, stretch)
else else
{ {
var StretchLng = stretch; var bNotStretchDelim = (this.type == OPER_DELIMITER || this.type == OPER_SEPARATOR) && this.grow == false;
//bNotStretchAccent = this.type == OPER_ACCENT && this.typeOper == ACCENT_TILDE;
var bNotStretchDelim = (this.type == OPER_DELIMITER || this.type == OPER_SEPARATOR) && this.grow == false, var StretchLng = bNotStretchDelim /*|| bNotStretchAccent*/ ? 0 : stretch;
bNotStretchAccent = this.type == OPER_ACCENT && this.typeOper == ACCENT_TILDE;
var StretchLng = bNotStretchDelim || bNotStretchAccent ? 0 : stretch;
this.operator.fixSize(StretchLng); this.operator.fixSize(StretchLng);
dims = this.operator.getCoordinateGlyph(); dims = this.operator.getCoordinateGlyph();
......
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