Commit edbf0271 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Сбрасывался трансформ у подписей оси

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68217 954022d7-b5bf-4e40-9824-e11837661b57
parent 7038eb1e
...@@ -1148,6 +1148,51 @@ CDLbl.prototype = ...@@ -1148,6 +1148,51 @@ CDLbl.prototype =
this.invertTransformText = global_MatrixTransformer.Invert(this.transformText); this.invertTransformText = global_MatrixTransformer.Invert(this.transformText);
}, },
setPosition2: function(x, y)
{
this.x = x;
this.y = y;
if(this.layout && this.layout.manualLayout)
{
if(typeof this.layout.manualLayout.x === "number")
{
this.calcX = this.chart.extX*this.layout.x + this.x;
}
else
{
this.calcX = this.x;
}
if(typeof this.layout.manualLayout.y === "number")
{
this.calcY = this.chart.extY*this.layout.y + this.y;
}
else
{
this.calcY = this.y;
}
}
else
{
this.calcX = this.x;
this.calcY = this.y;
}
this.localTransform.tx = x;
this.localTransform.ty = y;
this.transform = this.localTransform.CreateDublicate();
this.invertTransform = global_MatrixTransformer.Invert(this.transform);
this.localTransformText.tx = x;
this.localTransformText.ty = y;
this.transformText = this.localTransformText.CreateDublicate();
this.invertTransformText = global_MatrixTransformer.Invert(this.transformText);
},
updateTransformMatrix: function() updateTransformMatrix: function()
{ {
this.transform = this.localTransform.CreateDublicate(); this.transform = this.localTransform.CreateDublicate();
......
...@@ -5395,7 +5395,7 @@ CChartSpace.prototype = ...@@ -5395,7 +5395,7 @@ CChartSpace.prototype =
deltaX = oLabel.localTransformText.tx - oCatAx.xPoints[i].pos; deltaX = oLabel.localTransformText.tx - oCatAx.xPoints[i].pos;
deltaY = oLabel.localTransformText.ty - oAxisLabels.y; deltaY = oLabel.localTransformText.ty - oAxisLabels.y;
oNewPos = oCatAx.transformXPoints[i]; oNewPos = oCatAx.transformXPoints[i];
oLabel.setPosition(oNewPos.x + deltaX, oNewPos.y + deltaY); oLabel.setPosition2(oNewPos.x + deltaX, oNewPos.y + deltaY);
} }
} }
...@@ -5409,7 +5409,7 @@ CChartSpace.prototype = ...@@ -5409,7 +5409,7 @@ CChartSpace.prototype =
deltaX = oLabel.localTransformText.tx - oAxisLabels.x; deltaX = oLabel.localTransformText.tx - oAxisLabels.x;
deltaY = oLabel.localTransformText.ty - oValAx.yPoints[i].pos; deltaY = oLabel.localTransformText.ty - oValAx.yPoints[i].pos;
oNewPos = oValAx.transformYPoints[i]; oNewPos = oValAx.transformYPoints[i];
oLabel.setPosition(oNewPos.x + deltaX, oNewPos.y + deltaY); oLabel.setPosition2(oNewPos.x + deltaX, oNewPos.y + deltaY);
} }
} }
...@@ -5427,7 +5427,7 @@ CChartSpace.prototype = ...@@ -5427,7 +5427,7 @@ CChartSpace.prototype =
deltaX = oLabel.localTransformText.tx - oValAx.xPoints[i].pos; deltaX = oLabel.localTransformText.tx - oValAx.xPoints[i].pos;
deltaY = oLabel.localTransformText.ty - oAxisLabels.y; deltaY = oLabel.localTransformText.ty - oAxisLabels.y;
oNewPos = oValAx.transformXPoints[i]; oNewPos = oValAx.transformXPoints[i];
oLabel.setPosition(oNewPos.x + deltaX, oNewPos.y + deltaY); oLabel.setPosition2(oNewPos.x + deltaX, oNewPos.y + deltaY);
} }
} }
...@@ -5442,7 +5442,7 @@ CChartSpace.prototype = ...@@ -5442,7 +5442,7 @@ CChartSpace.prototype =
deltaX = oLabel.localTransformText.tx - oAxisLabels.x; deltaX = oLabel.localTransformText.tx - oAxisLabels.x;
deltaY = oLabel.localTransformText.ty - oCatAx.yPoints[i].pos; deltaY = oLabel.localTransformText.ty - oCatAx.yPoints[i].pos;
oNewPos = oCatAx.transformYPoints[i]; oNewPos = oCatAx.transformYPoints[i];
oLabel.setPosition(oNewPos.x + deltaX, oNewPos.y + deltaY); oLabel.setPosition2(oNewPos.x + deltaX, oNewPos.y + deltaY);
} }
} }
} }
...@@ -5968,7 +5968,7 @@ CChartSpace.prototype = ...@@ -5968,7 +5968,7 @@ CChartSpace.prototype =
legend.extX = legend_width; legend.extX = legend_width;
legend.extY = legend_height; legend.extY = legend_height;
calc_entryes.splice(cut_index, calc_entryes.length - cut_index); calc_entryes.splice(cut_index, calc_entryes.length - cut_index);
for(i = 0; i <cut_index && i < calc_entryes.length; ++i) for(i = 0; i < cut_index && i < calc_entryes.length; ++i)
{ {
calc_entry = calc_entryes[i]; calc_entry = calc_entryes[i];
calc_entry.calcMarkerUnion.lineMarker.localX = (i - hor_count*((i/hor_count) >> 0))*(max_entry_width + line_marker_width + 2*distance_to_text) + distance_to_text; calc_entry.calcMarkerUnion.lineMarker.localX = (i - hor_count*((i/hor_count) >> 0))*(max_entry_width + line_marker_width + 2*distance_to_text) + distance_to_text;
......
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