Commit 95e2b4b1 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@47710 954022d7-b5bf-4e40-9824-e11837661b57
parent c43909d5
......@@ -414,6 +414,24 @@ CImage.prototype =
graphics.SetIntegerGrid(true);
},
check_bounds: function(checker)
{
if (this.spPr.geometry)
{
this.spPr.geometry.check_bounds(checker);
}
else
{
checker._s();
checker._m(0, 0);
checker._l(this.absExtX, 0);
checker._l(this.absExtX, this.absExtY);
checker._l(0, this.absExtY);
checker._z();
checker._e();
}
},
hitToAdjustment: function(x, y)
{
return {hit: false, adjPolarFlag: null, adjNum: null};
......
......@@ -370,6 +370,24 @@ CShape.prototype =
graphics.SetIntegerGrid(true);
},
check_bounds: function(checker)
{
if (this.spPr.geometry)
{
this.spPr.geometry.check_bounds(checker);
}
else
{
checker._s();
checker._m(0, 0);
checker._l(this.absExtX, 0);
checker._l(this.absExtX, this.absExtY);
checker._l(0, this.absExtY);
checker._z();
checker._e();
}
},
drawAdjustments: function(drawingDocument)
{
if(isRealObject(this.spPr.geometry))
......
......@@ -27,7 +27,7 @@ var STATES_ID_PRE_RESIZE_IN_GROUP = 0x17;
var STATES_ID_RESIZE_IN_GROUP = 0x18;
var STATES_ID_PRE_MOVE_IN_GROUP = 0x19;
var STATES_ID_MOVE_IN_GROUP = 0x20;
var STATES_ID_START_ADD_POLY_LINE = 0x21;
var asc = window["Asc"] ? window["Asc"] : (window["Asc"] = {});
......@@ -124,6 +124,7 @@ function NullState(drawingObjectsController, drawingObjects)
var hit_in_text_rect = cur_drawing.hitInTextRect(x, y);
if(hit_in_inner_area && !hit_in_text_rect || hit_in_path)
{
this.drawingObjectsController.clearPreTrackObjects();
var is_selected = cur_drawing.selected;
if(!(e.ctrlKey || e.shiftKey) && !is_selected)
this.drawingObjectsController.resetSelection();
......@@ -152,6 +153,7 @@ function NullState(drawingObjectsController, drawingObjects)
var hit_in_text_rect = cur_grouped_object.hitInTextRect(x, y);
if(hit_in_inner_area && !hit_in_text_rect || hit_in_path)
{
this.drawingObjectsController.clearPreTrackObjects();
var is_selected = cur_drawing.selected;
if(!(e.ctrlKey || e.shiftKey))
this.drawingObjectsController.resetSelection();
......@@ -1153,7 +1155,7 @@ function GroupState(drawingObjectsController, drawingObjects, group)
var hit_in_text_rect = cur_drawing.hitInTextRect(x, y);
if(hit_in_inner_area && !hit_in_text_rect || hit_in_path)
{
return {objectId: cur_drawing.drawingBase.id, cursorType: "move"};
return {objectId: this.group.drawingBase.id, cursorType: "move"};
}
else if(hit_in_text_rect)
{
......@@ -1516,6 +1518,35 @@ function ResizeInGroupState(drawingObjectsController, drawingObjects, group, maj
};
}
function StartAddPolyLineState(drawingObjectsController, drawingObjects)
{
this.id = STATES_ID_START_ADD_POLY_LINE;
this.drawingObjectsController = drawingObjectsController;
this.drawingObjects = drawingObjects;
this.onMouseDown = function(e, x, y)
{};
this.onMouseMove = function(e, x, y)
{
var resize_coefficients = this.majorObject.getResizeCoefficients(this.handleNum, x, y);
this.drawingObjectsController.trackResizeObjects(resize_coefficients.kd1, resize_coefficients.kd2, e);
this.drawingObjects.selectGraphicObject();
this.drawingObjects.showOverlayGraphicObjects();
};
this.onMouseUp = function(e, x, y)
{
this.drawingObjectsController.trackEnd();
this.group.normalize();
this.group.updateCoordinatesAfterInternalResize();
this.group.recalculateTransform();
this.drawingObjectsController.clearTrackObjects();
this.drawingObjectsController.changeCurrentState(new GroupState(this.drawingObjectsController, this.drawingObjects, this.group));
};
}
function DrawDefaultSelection(drawingObjectsController, drawingDocument)
{
......
......@@ -1076,7 +1076,6 @@ function ResizeTrackShapeImageInGroup(originalObject, cardDirection)
global_MatrixTransformer.TranslateAppend(_transform, this.resizedPosX, this.resizedPosY);
global_MatrixTransformer.TranslateAppend(_transform, _horizontal_center, _vertical_center);
global_MatrixTransformer.MultiplyAppend(_transform, this.originalObject.group.getTransform());
};
this.draw = function(overlay)
......
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