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

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48538 954022d7-b5bf-4e40-9824-e11837661b57
parent f2e18158
...@@ -487,6 +487,7 @@ CTextBody.prototype = ...@@ -487,6 +487,7 @@ CTextBody.prototype =
{ {
this.content.Paragraph_Add(paraItem); this.content.Paragraph_Add(paraItem);
this.content.Recalculate_Page(0, true ); this.content.Recalculate_Page(0, true );
this.content.RecalculateCurPos();
if(this.bodyPr.anchor !== VERTICAL_ANCHOR_TYPE_TOP) if(this.bodyPr.anchor !== VERTICAL_ANCHOR_TYPE_TOP)
{ {
this.shape.calculateTransformTextMatrix(); this.shape.calculateTransformTextMatrix();
......
...@@ -1293,7 +1293,7 @@ function ChartTextAdd(drawingObjectsController, drawingObjects, chart, textObjec ...@@ -1293,7 +1293,7 @@ function ChartTextAdd(drawingObjectsController, drawingObjects, chart, textObjec
this.onMouseMove = function(e, x, y) this.onMouseMove = function(e, x, y)
{ {
if(e.which > 0) if(e.which > 0 && e.type === "mousemove")
{ {
this.textObject.selectionSetEnd(e, x, y); this.textObject.selectionSetEnd(e, x, y);
this.textObject.updateSelectionState(this.drawingObjects.drawingDocument); this.textObject.updateSelectionState(this.drawingObjects.drawingDocument);
...@@ -1353,7 +1353,7 @@ function TextAddState(drawingObjectsController, drawingObjects, textObject) ...@@ -1353,7 +1353,7 @@ function TextAddState(drawingObjectsController, drawingObjects, textObject)
this.onMouseMove = function(e, x, y) this.onMouseMove = function(e, x, y)
{ {
if(e.which > 0) if(e.which > 0 && e.type === "mousemove")
{ {
this.textObject.selectionSetEnd(e, x, y); this.textObject.selectionSetEnd(e, x, y);
this.textObject.updateSelectionState(this.drawingObjects.drawingDocument); this.textObject.updateSelectionState(this.drawingObjects.drawingDocument);
...@@ -2798,6 +2798,45 @@ function GroupState(drawingObjectsController, drawingObjects, group) ...@@ -2798,6 +2798,45 @@ function GroupState(drawingObjectsController, drawingObjects, group)
} }
function TextAddInGroup(drawingObjectsController, drawingObjects, group, textObject)
{
this.id = STATES_ID_TEXT_ADD_IN_GROUP;
this.drawingObjectsController = drawingObjectsController;
this.drawingObjects = drawingObjects;
this.groupState = new GroupState(drawingObjectsController, drawingObjectsController, group);
this.textObject = textObject;
this.onMouseDown = function(e, x, y)
{
this.groupState.onMouseDown(e, x, y);
};
this.onMouseMove = function(e, x, y)
{
if(e.which > 0 && e.type === "mousemove")
{
this.textObject.selectionSetEnd(e, x, y);
this.textObject.updateSelectionState(this.drawingObjects.drawingDocument);
}
};
this.onMouseUp = function(e, x, y)
{
this.textObject.selectionSetEnd(e, x, y);
this.textObject.updateSelectionState(this.drawingObjects.drawingDocument);
};
this.drawSelection = function(drawingDocument)
{
drawingDocument.DrawTrack(TYPE_TRACK_GROUP_PASSIVE, this.group.getTransform(), 0, 0, this.group.extX, this.group.extY, false/*, selected_objects[i].canRotate()TODO*/);
drawingDocument.DrawTrack(TYPE_TRACK_TEXT, this.textObject.getTransform(), 0, 0, this.textObject.extX, this.textObject.extY, false/*, selected_objects[i].canRotate()TODO*/)
this.textObject.drawAdjustments(drawingDocument);
};
this.isPointInDrawingObjects = function(x, y)
{
return this.groupState.isPointInDrawingObjects(x, y);
};
}
function PreMoveInGroupState(drawingObjectsController, drawingObjects, group, startX, startY, shiftKey, ctrlKey, majorObject, majorObjectIsSelected) function PreMoveInGroupState(drawingObjectsController, drawingObjects, group, startX, startY, shiftKey, ctrlKey, majorObject, majorObjectIsSelected)
{ {
this.id = STATES_ID_PRE_MOVE_IN_GROUP; this.id = STATES_ID_PRE_MOVE_IN_GROUP;
...@@ -4005,7 +4044,7 @@ function AddPolyLine2State3(drawingObjectsController, drawingObjects, polyline) ...@@ -4005,7 +4044,7 @@ function AddPolyLine2State3(drawingObjectsController, drawingObjects, polyline)
this.onMouseMove = function(e, x, y) this.onMouseMove = function(e, x, y)
{ {
if(e.which === 0) if(e.which > 0 && e.type === "mousemove")
{ {
this.polyline.arrPoint[this.polyline.arrPoint.length - 1] = {x: x, y: y}; this.polyline.arrPoint[this.polyline.arrPoint.length - 1] = {x: x, y: y};
} }
......
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