Commit 2db58068 authored by Sergey Luzyanin's avatar Sergey Luzyanin

clear track objects before run plugin

parent a15d3321
...@@ -303,13 +303,18 @@ DrawingObjectsController.prototype.createGroup = function() ...@@ -303,13 +303,18 @@ DrawingObjectsController.prototype.createGroup = function()
DrawingObjectsController.prototype.handleChartDoubleClick = function() DrawingObjectsController.prototype.handleChartDoubleClick = function()
{ {
var drawingObjects = this.drawingObjects; var drawingObjects = this.drawingObjects;
var oThis = this;
this.checkSelectedObjectsAndFireCallback(function(){ this.checkSelectedObjectsAndFireCallback(function(){
oThis.clearTrackObjects();
oThis.clearPreTrackObjects();
oThis.changeCurrentState(new AscFormat.NullState(this));
drawingObjects.showChartSettings(); drawingObjects.showChartSettings();
}, []); }, []);
} }
DrawingObjectsController.prototype.handleOleObjectDoubleClick = function(drawing, oleObject, e, x, y, pageIndex) DrawingObjectsController.prototype.handleOleObjectDoubleClick = function(drawing, oleObject, e, x, y, pageIndex)
{ {
var drawingObjects = this.drawingObjects; var drawingObjects = this.drawingObjects;
var oThis = this;
this.checkSelectedObjectsAndFireCallback(function(){ this.checkSelectedObjectsAndFireCallback(function(){
var pluginData = new Asc.CPluginData(); var pluginData = new Asc.CPluginData();
pluginData.setAttribute("data", oleObject.m_sData); pluginData.setAttribute("data", oleObject.m_sData);
...@@ -320,6 +325,9 @@ DrawingObjectsController.prototype.handleOleObjectDoubleClick = function(drawing ...@@ -320,6 +325,9 @@ DrawingObjectsController.prototype.handleOleObjectDoubleClick = function(drawing
pluginData.setAttribute("heightPix", oleObject.m_nPixHeight); pluginData.setAttribute("heightPix", oleObject.m_nPixHeight);
pluginData.setAttribute("objectId", oleObject.Id); pluginData.setAttribute("objectId", oleObject.Id);
window["Asc"]["editor"].asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData); window["Asc"]["editor"].asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData);
oThis.clearTrackObjects();
oThis.clearPreTrackObjects();
oThis.changeCurrentState(new AscFormat.NullState(this));
this.onMouseUp(e, x, y); this.onMouseUp(e, x, y);
}, []); }, []);
}; };
......
...@@ -102,6 +102,8 @@ DrawingObjectsController.prototype.handleOleObjectDoubleClick = function(drawing ...@@ -102,6 +102,8 @@ DrawingObjectsController.prototype.handleOleObjectDoubleClick = function(drawing
pluginData.setAttribute("objectId", oleObject.Id); pluginData.setAttribute("objectId", oleObject.Id);
editor.asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData); editor.asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData);
} }
this.clearTrackObjects();
this.clearPreTrackObjects();
this.changeCurrentState(new AscFormat.NullState(this)); this.changeCurrentState(new AscFormat.NullState(this));
oPresentation.OnMouseUp(e, x, y, pageIndex); oPresentation.OnMouseUp(e, x, y, pageIndex);
}; };
......
...@@ -1256,6 +1256,8 @@ CGraphicObjects.prototype = ...@@ -1256,6 +1256,8 @@ CGraphicObjects.prototype =
{ {
editor.asc_doubleClickOnChart(this.getChartObject()); editor.asc_doubleClickOnChart(this.getChartObject());
} }
this.clearTrackObjects();
this.clearPreTrackObjects();
this.changeCurrentState(new AscFormat.NullState(this)); this.changeCurrentState(new AscFormat.NullState(this));
this.document.OnMouseUp(e, x, y, pageIndex); this.document.OnMouseUp(e, x, y, pageIndex);
}, },
...@@ -1277,6 +1279,8 @@ CGraphicObjects.prototype = ...@@ -1277,6 +1279,8 @@ CGraphicObjects.prototype =
pluginData.setAttribute("objectId", oleObject.Id); pluginData.setAttribute("objectId", oleObject.Id);
editor.asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData); editor.asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData);
} }
this.clearTrackObjects();
this.clearPreTrackObjects();
this.changeCurrentState(new AscFormat.NullState(this)); this.changeCurrentState(new AscFormat.NullState(this));
this.document.OnMouseUp(e, x, y, pageIndex); this.document.OnMouseUp(e, x, y, pageIndex);
}, },
......
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