Commit 84ab565b authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 32482 - Диаграмма добавляется вверху листа без учета прокрутки содержимого

parent 146b4ec5
......@@ -306,12 +306,12 @@ DrawingObjectsController.prototype.addChartDrawingObject = function(options)
}
else
{
chartLeft = this.drawingObjects.convertMetric((this.drawingObjects.getContextWidth() - w) / 2, 0, 3);
chartLeft = -this.drawingObjects.convertMetric(this.drawingObjects.getScrollOffset().getX(), 0, 3) + this.drawingObjects.convertMetric((this.drawingObjects.getContextWidth() - w) / 2, 0, 3);
if(chartLeft < 0)
{
chartLeft = 0;
}
chartTop = this.drawingObjects.convertMetric((this.drawingObjects.getContextHeight() - h) / 2, 0, 3);
chartTop = -this.drawingObjects.convertMetric(this.drawingObjects.getScrollOffset().getY(), 0, 3) + this.drawingObjects.convertMetric((this.drawingObjects.getContextHeight() - h) / 2, 0, 3);
if(chartTop < 0)
{
chartTop = 0;
......
......@@ -1231,6 +1231,10 @@ function DrawingObjects() {
// Constructor
//-----------------------------------------------------------------------------------
_this.getScrollOffset = function()
{
return scrollOffset;
};
_this.saveStateBeforeLoadChanges = function(){
if(this.controller){
......
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