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

Bug 22106 - [Shapes] Не отрисовывается автофигура "произвольная линия" при клике на элемент меню

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61197 954022d7-b5bf-4e40-9824-e11837661b57
parent a0442c9a
......@@ -536,19 +536,6 @@ DrawingObjectsController.prototype =
}
},
getSnapArraysTrackObjects: function()
{
var snapX = [], snapY = [];
for(var i = 0; i < this.arrTrackObjects.length; ++i)
{
if(this.arrTrackObjects[i].originalObject && this.arrTrackObjects[i].originalObject.getSnapArrays)
{
this.arrTrackObjects[i].originalObject.getSnapArrays(snapX, snapY);
}
}
return {snapX: snapX, snapY: snapY};
},
handleTextHit: function(object, e, x, y, group, pageIndex, bWord)
{
var content, invert_transform_text, tx, ty, hit_paragraph, par, check_hyperlink;
......
......@@ -1342,6 +1342,14 @@ SplineBezierState2.prototype =
onMouseUp: function(e, x, y, pageIndex)
{
if(e.fromWindow)
{
var nOldClickCount = e.ClickCount;
e.ClickCount = 2;
this.onMouseDown(e, x, y, pageIndex);
e.ClickCount = nOldClickCount;
return;
}
if( e.ClickCount < 2)
{
var tr_x, tr_y;
......@@ -1442,6 +1450,14 @@ SplineBezierState3.prototype =
onMouseUp: function(e, x, y, pageIndex)
{
if(e.fromWindow)
{
var nOldClickCount = e.ClickCount;
e.ClickCount = 2;
this.onMouseDown(e, x, y, pageIndex);
e.ClickCount = nOldClickCount;
return;
}
if(e.ClickCount >= 2)
{
this.bStart = true;
......@@ -1545,6 +1561,14 @@ SplineBezierState4.prototype =
onMouseUp: function(e, x, y, pageIndex)
{
if(e.fromWindow)
{
var nOldClickCount = e.ClickCount;
e.ClickCount = 2;
this.onMouseDown(e, x, y, pageIndex);
e.ClickCount = nOldClickCount;
return;
}
if(e.ClickCount < 2 )
{
var tr_x, tr_y;
......@@ -1661,7 +1685,7 @@ SplineBezierState5.prototype =
onMouseUp: function(e, x, y, pageIndex)
{
if(e.ClickCount >= 2)
if(e.ClickCount >= 2 || e.fromWindow)
{
this.bStart = true;
this.pageIndex = this.drawingObjects.startTrackPos.pageIndex;
......@@ -1915,6 +1939,14 @@ AddPolyLine2State3.prototype =
onMouseUp: function(e, x, y, pageIndex)
{
if(e.fromWindow)
{
var nOldClickCount = e.ClickCount;
e.ClickCount = 2;
this.onMouseDown(e, x, y, pageIndex);
e.ClickCount = nOldClickCount;
return;
}
if(e.ClickCount > 1)
{
......
......@@ -1080,6 +1080,7 @@
if (this.isShapeAction) {
event.isLocked = this.isMousePressed;
event.ClickCount = this.clickCounter.clickCount;
event.fromWindow = true;
this.handlers.trigger("graphicObjectMouseUp", event, coord.x, coord.y);
this._changeSelectionDone(event);
return true;
......@@ -1331,11 +1332,8 @@
event.ClickCount = this.clickCounter.clickCount;
this.handlers.trigger("graphicObjectMouseUp", event, coord.x, coord.y);
this._changeSelectionDone(event);
if (asc["editor"].isStartAddShape)
{
event.preventDefault && event.preventDefault();
event.stopPropagation && event.stopPropagation();
}
event.preventDefault && event.preventDefault();
event.stopPropagation && event.stopPropagation();
return 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