Commit 1602fc29 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@48523 954022d7-b5bf-4e40-9824-e11837661b57
parent df90d968
...@@ -81,6 +81,11 @@ CImage.prototype = ...@@ -81,6 +81,11 @@ CImage.prototype =
return CLASS_TYPE_IMAGE; return CLASS_TYPE_IMAGE;
}, },
Get_Id: function()
{
return this.Id;
},
isShape: function() isShape: function()
{ {
return false; return false;
......
...@@ -1641,7 +1641,7 @@ function RotateState(drawingObjectsController, drawingObjects, majorObject) ...@@ -1641,7 +1641,7 @@ function RotateState(drawingObjectsController, drawingObjects, majorObject)
track_objects2.push(track_objects[i]); track_objects2.push(track_objects[i]);
} }
var drawibgObjects = this.drawingObjects; var drawingObjects = this.drawingObjects;
var callback = function(bLock) var callback = function(bLock)
{ {
if(bLock) if(bLock)
...@@ -1649,7 +1649,6 @@ function RotateState(drawingObjectsController, drawingObjects, majorObject) ...@@ -1649,7 +1649,6 @@ function RotateState(drawingObjectsController, drawingObjects, majorObject)
History.Create_NewPoint(); History.Create_NewPoint();
for(var i = 0; i < track_objects2.length; ++i) for(var i = 0; i < track_objects2.length; ++i)
track_objects2[i].trackEnd(); track_objects2[i].trackEnd();
drawingObjects.showDrawingObjects(true); drawingObjects.showDrawingObjects(true);
} }
...@@ -1751,9 +1750,39 @@ function ResizeState(drawingObjectsController, drawingObjects, majorObject, card ...@@ -1751,9 +1750,39 @@ function ResizeState(drawingObjectsController, drawingObjects, majorObject, card
}; };
this.onMouseUp = function(e, x, y) this.onMouseUp = function(e, x, y)
{
var worksheet = this.drawingObjects.getWorksheet();
worksheet.collaborativeEditing.onStartCheckLock();
var track_objects = this.drawingObjectsController.arrTrackObjects;
for(var i =0; i < track_objects.length; ++i)
{
this.drawingObjects.lockDrawingObject(track_objects[i].originalObject.Get_Id(), true, true)
}
var track_objects2 = [];
for(i = 0; i < track_objects.length; ++i)
{
track_objects2.push(track_objects[i]);
}
var drawingObjects = this.drawingObjects;
var callback = function(bLock)
{
if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
this.drawingObjectsController.trackEnd(); for(var i = 0; i < track_objects2.length; ++i)
track_objects2[i].trackEnd();
drawingObjects.showDrawingObjects(true);
}
};
worksheet.collaborativeEditing.onEndCheckLock(callback);
//History.Create_NewPoint();
//this.drawingObjectsController.trackEnd();
this.drawingObjectsController.clearTrackObjects(); this.drawingObjectsController.clearTrackObjects();
this.drawingObjects.OnUpdateOverlay(); this.drawingObjects.OnUpdateOverlay();
this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects)); this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects));
...@@ -1980,6 +2009,9 @@ function TrackNewShapeState(drawingObjectsController, drawingObjects, presetGeom ...@@ -1980,6 +2009,9 @@ function TrackNewShapeState(drawingObjectsController, drawingObjects, presetGeom
this.onMouseUp = function(e, x, y) this.onMouseUp = function(e, x, y)
{ {
this.drawingObjectsController.resetSelection(); this.drawingObjectsController.resetSelection();
History.Create_NewPoint(); History.Create_NewPoint();
this.drawingObjectsController.trackEnd(); this.drawingObjectsController.trackEnd();
this.drawingObjectsController.clearTrackObjects(); this.drawingObjectsController.clearTrackObjects();
...@@ -1994,6 +2026,12 @@ function TrackNewShapeState(drawingObjectsController, drawingObjects, presetGeom ...@@ -1994,6 +2026,12 @@ function TrackNewShapeState(drawingObjectsController, drawingObjects, presetGeom
/*this.resultObject.selectionSetStart(e, x, y); /*this.resultObject.selectionSetStart(e, x, y);
this.drawingObjectsController.onMouseUp(e, x, y);*/ this.drawingObjectsController.onMouseUp(e, x, y);*/
} }
//лочим добавленный шейп
var worksheet = this.drawingObjects.getWorksheet();
worksheet.collaborativeEditing.onStartCheckLock();
this.drawingObjects.lockDrawingObject(this.resultObject.Get_Id(), true, true);
worksheet.collaborativeEditing.onEndCheckLock(function(bLock){});
asc["editor"].asc_endAddShape(); asc["editor"].asc_endAddShape();
}; };
...@@ -2212,9 +2250,36 @@ function MoveState(drawingObjectsController, drawingObjects, startX, startY, rec ...@@ -2212,9 +2250,36 @@ function MoveState(drawingObjectsController, drawingObjects, startX, startY, rec
}; };
this.onMouseUp = function(e, x, y) this.onMouseUp = function(e, x, y)
{
var worksheet = this.drawingObjects.getWorksheet();
worksheet.collaborativeEditing.onStartCheckLock();
var track_objects = this.drawingObjectsController.arrTrackObjects;
for(var i =0; i < track_objects.length; ++i)
{
this.drawingObjects.lockDrawingObject(track_objects[i].originalObject.Get_Id(), true, true)
}
var track_objects2 = [];
for(i = 0; i < track_objects.length; ++i)
{
track_objects2.push(track_objects[i]);
}
var drawingObjects = this.drawingObjects;
var callback = function(bLock)
{
if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
this.drawingObjectsController.trackEnd(); for(var i = 0; i < track_objects2.length; ++i)
track_objects2[i].trackEnd();
drawingObjects.showDrawingObjects(true);
}
};
worksheet.collaborativeEditing.onEndCheckLock(callback);
//History.Create_NewPoint();
//this.drawingObjectsController.trackEnd();
this.drawingObjectsController.clearTrackObjects(); this.drawingObjectsController.clearTrackObjects();
this.drawingObjects.OnUpdateOverlay(); this.drawingObjects.OnUpdateOverlay();
this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects)); this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects));
...@@ -2307,9 +2372,36 @@ function ChangeAdjState(drawingObjectsController, drawingObjects) ...@@ -2307,9 +2372,36 @@ function ChangeAdjState(drawingObjectsController, drawingObjects)
}; };
this.onMouseUp = function(e, x, y) this.onMouseUp = function(e, x, y)
{
var worksheet = this.drawingObjects.getWorksheet();
worksheet.collaborativeEditing.onStartCheckLock();
var track_objects = this.drawingObjectsController.arrTrackObjects;
for(var i =0; i < track_objects.length; ++i)
{
this.drawingObjects.lockDrawingObject(track_objects[i].originalShape.Get_Id(), true, true)
}
var track_objects2 = [];
for(i = 0; i < track_objects.length; ++i)
{
track_objects2.push(track_objects[i]);
}
var drawingObjects = this.drawingObjects;
var callback = function(bLock)
{
if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
this.drawingObjectsController.trackEnd(); for(var i = 0; i < track_objects2.length; ++i)
track_objects2[i].trackEnd();
drawingObjects.showDrawingObjects(true);
}
};
worksheet.collaborativeEditing.onEndCheckLock(callback);
//History.Create_NewPoint();
//this.drawingObjectsController.trackEnd();
this.drawingObjectsController.clearTrackObjects(); this.drawingObjectsController.clearTrackObjects();
this.drawingObjects.OnUpdateOverlay(); this.drawingObjects.OnUpdateOverlay();
this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects)); this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects));
...@@ -2901,6 +2993,8 @@ function ChangeAdjInGroupState(drawingObjectsController, drawingObjects, group) ...@@ -2901,6 +2993,8 @@ function ChangeAdjInGroupState(drawingObjectsController, drawingObjects, group)
this.onMouseUp = function(e, x, y) this.onMouseUp = function(e, x, y)
{ {
this.drawingObjectsController.trackEnd(); this.drawingObjectsController.trackEnd();
this.drawingObjectsController.clearTrackObjects(); this.drawingObjectsController.clearTrackObjects();
this.drawingObjects.OnUpdateOverlay(); this.drawingObjects.OnUpdateOverlay();
......
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