Commit aa36ff32 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@47571 954022d7-b5bf-4e40-9824-e11837661b57
parent 437698e1
......@@ -146,7 +146,7 @@ DrawingObjectsController.prototype =
var hit_to_adj = selected_objects[0].hitToAdjustment(x, y);
if(hit_to_adj.hit)
{
return true;
return selected_objects[0].drawingBase.id;
}
}
......@@ -158,14 +158,14 @@ DrawingObjectsController.prototype =
if(hit_to_handles === 8)
{
if(!selected_objects[i].canRotate())
return false;
return null;
}
else
{
if(!selected_objects[i].canResize())
return false;
return null;
}
return true;
return selected_objects[i].drawingBase.id;
}
}
......@@ -173,7 +173,7 @@ DrawingObjectsController.prototype =
{
if(selected_objects[i].hitInBoundingRect(x, y))
{
return selected_objects[i].canMove();
return selected_objects[i].canMove() ? selected_objects[i].drawingBase.id : null;
}
}
......@@ -191,97 +191,20 @@ DrawingObjectsController.prototype =
var hit_in_text_rect = cur_drawing.hitInTextRect(x, y);
if(hit_in_inner_area && !hit_in_text_rect || hit_in_path)
{
if(!cur_drawing.canMove())
return false;
return true;
return cur_drawing.canMove() ? cur_drawing_base.id : null;
}
else if(hit_in_text_rect)
{
return false
return null;//TODO
}
}
else
{
}
}
}
return false;
},
isPointInDrawingObjects2: function(x, y)
{
var selected_objects = this.drawingObjectsController.selectedObjects;
if(selected_objects.length === 1)
{
var hit_to_adj = selected_objects[0].hitToAdjustment(x, y);
if(hit_to_adj.hit)
{
return true;
}
}
for(var i = selected_objects.length - 1; i > -1; --i)
{
var hit_to_handles = selected_objects[i].hitToHandles(x, y);
if(hit_to_handles > -1)
{
if(hit_to_handles === 8)
{
if(!selected_objects[i].canRotate())
return false;
}
else
{
if(!selected_objects[i].canResize())
return false;
}
return true;
}
}
for(i = selected_objects.length - 1; i > -1; --i)
{
if(selected_objects[i].hitInBoundingRect(x, y))
{
if(!selected_objects[i].canMove())
return;
for(var j = 0; j < selected_objects.length; ++j)
{
this.drawingObjectsController.addPreTrackObject(selected_objects[j].createMoveTrack());
//TODO
}
this.drawingObjectsController.changeCurrentState(new PreMoveState(this.drawingObjectsController, this.drawingObjects, x, y));
return true;
}
}
return null;
var arr_drawing_objects = this.drawingObjects.getDrawingObjects();
for(i = arr_drawing_objects.length-1; i > -1; --i)
{
var cur_drawing_base = arr_drawing_objects[i];
if(cur_drawing_base.isGraphicObject())
{
var cur_drawing = cur_drawing_base.graphicObject;
if(cur_drawing.isSimpleObject())
{
var hit_in_inner_area = cur_drawing.hitInInnerArea(x, y);
var hit_in_path = cur_drawing.hitInPath(x, y);
var hit_in_text_rect = cur_drawing.hitInTextRect(x, y);
if(hit_in_inner_area && !hit_in_text_rect || hit_in_path)
{
}
else if(hit_in_text_rect)
{
}
}
else
{
}
}
}
}
};
\ No newline at end of file
......@@ -141,7 +141,7 @@ CGroupShape.prototypr =
this.arrGraphicObjects.push(this.spTree[i]);
else
{
var arr_graphic_objects = this.spTree.getArrGraphicObjects();
var arr_graphic_objects = this.spTree[i].getArrGraphicObjects();
for(var j = 0; j < arr_graphic_objects.length; ++j)
this.arrGraphicObjects.push(arr_graphic_objects[i]);
}
......
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