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

правка бага 12343 - Позиция изображения не передается при перемещении с помощью стрелок клавиатуры

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51370 954022d7-b5bf-4e40-9824-e11837661b57
parent bb07c4d2
......@@ -3967,12 +3967,14 @@ CGraphicObjects.prototype =
{
if(false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : drawing.Parent, CheckType : changestype_Paragraph_Content} ))
{
var nearest_pos = this.document.Get_NearestPos(drawing.pageIndex, drawing.absOffsetX, drawing.absOffsetY, true, drawing.parent);
var dist = this.drawingDocument.GetMMPerDot(5);
drawing.setAbsoluteTransform(drawing.absOffsetX - dist, drawing.absOffsetY, null, null, null, null, null);
if(isRealObject(drawing.GraphicObj))
drawing.GraphicObj.recalculate();
var bounds = drawing.getBounds();
drawing.OnEnd_ChangeFlow(drawing.absOffsetX, drawing.absOffsetY,drawing.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, null, true, false);
drawing.OnEnd_ChangeFlow(drawing.absOffsetX, drawing.absOffsetY,drawing.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, nearest_pos, true, false);
b_recalc = true;
}
}
......@@ -4021,12 +4023,14 @@ CGraphicObjects.prototype =
{
if(false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : drawing.Parent, CheckType : changestype_Paragraph_Content} ))
{
var nearest_pos = this.document.Get_NearestPos(drawing.pageIndex, drawing.absOffsetX, drawing.absOffsetY, true, drawing.parent);
var dist = this.drawingDocument.GetMMPerDot(5);
drawing.setAbsoluteTransform(drawing.absOffsetX + dist, drawing.absOffsetY, null, null, null, null, null);
if(isRealObject(drawing.GraphicObj))
drawing.GraphicObj.recalculate();
var bounds = drawing.getBounds();
drawing.OnEnd_ChangeFlow(drawing.absOffsetX, drawing.absOffsetY,drawing.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, null, true, false);
drawing.OnEnd_ChangeFlow(drawing.absOffsetX, drawing.absOffsetY,drawing.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, nearest_pos, true, false);
b_recalc = true;
}
}
......@@ -4075,12 +4079,14 @@ CGraphicObjects.prototype =
{
if(false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : drawing.Parent, CheckType : changestype_Paragraph_Content} ))
{
var nearest_pos = this.document.Get_NearestPos(drawing.pageIndex, drawing.absOffsetX, drawing.absOffsetY, true, drawing.parent);
var dist = this.drawingDocument.GetMMPerDot(5);
drawing.setAbsoluteTransform(drawing.absOffsetX , drawing.absOffsetY- dist, null, null, null, null, null);
if(isRealObject(drawing.GraphicObj))
drawing.GraphicObj.recalculate();
var bounds = drawing.getBounds();
drawing.OnEnd_ChangeFlow(drawing.absOffsetX, drawing.absOffsetY,drawing.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, null, true, false);
drawing.OnEnd_ChangeFlow(drawing.absOffsetX, drawing.absOffsetY,drawing.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, nearest_pos, true, false);
b_recalc = true;
}
}
......@@ -4128,12 +4134,14 @@ CGraphicObjects.prototype =
{
if(false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : drawing.Parent, CheckType : changestype_Paragraph_Content} ))
{
var nearest_pos = this.document.Get_NearestPos(drawing.pageIndex, drawing.absOffsetX, drawing.absOffsetY, true, drawing.parent);
var dist = this.drawingDocument.GetMMPerDot(5);
drawing.setAbsoluteTransform(drawing.absOffsetX , drawing.absOffsetY + dist, null, null, null, null, null);
if(isRealObject(drawing.GraphicObj))
drawing.GraphicObj.recalculate();
var bounds = drawing.getBounds();
drawing.OnEnd_ChangeFlow(drawing.absOffsetX, drawing.absOffsetY,drawing.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, null, true, false);
drawing.OnEnd_ChangeFlow(drawing.absOffsetX, drawing.absOffsetY,drawing.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, nearest_pos, true, false);
b_recalc = true;
}
}
......
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