mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
[bug] fix bug 80014
This commit is contained in:
@ -1885,7 +1885,8 @@ CSparklineView.prototype.setMinMaxValAx = function(minVal, maxVal, oSparklineGro
|
||||
var ScrollOffset = function() {
|
||||
|
||||
this.getX = function() {
|
||||
return 2 * worksheet._getColLeft(0) - worksheet._getColLeft(worksheet.getFirstVisibleCol(true));
|
||||
var val = 2 * worksheet._getColLeft(0) - worksheet._getColLeft(worksheet.getFirstVisibleCol(true));
|
||||
return worksheet.getRightToLeft() ? -val : val;
|
||||
};
|
||||
|
||||
this.getY = function() {
|
||||
@ -3855,9 +3856,17 @@ CSparklineView.prototype.setMinMaxValAx = function(minVal, maxVal, oSparklineGro
|
||||
response.result = false;
|
||||
response.y = Math.abs(y);
|
||||
}
|
||||
if ( x < 0 ) {
|
||||
response.result = false;
|
||||
response.x = Math.abs(x);
|
||||
if (worksheet.getRightToLeft()) {
|
||||
var maxX = pxToMm(worksheet.getCtxWidth());
|
||||
if (x + w > maxX) {
|
||||
response.result = false;
|
||||
response.x = maxX - x - w; // negative → pushes shape left
|
||||
}
|
||||
} else {
|
||||
if ( x < 0 ) {
|
||||
response.result = false;
|
||||
response.x = Math.abs(x);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
@ -1878,8 +1878,8 @@ function MoveInGroupState(drawingObjects, majorObject, group, startX, startY)
|
||||
}
|
||||
this.rectX = Math.min.apply(Math, arr_x);
|
||||
this.rectY = Math.min.apply(Math, arr_y);
|
||||
this.rectW = Math.max.apply(Math, arr_x);
|
||||
this.rectH = Math.max.apply(Math, arr_y);
|
||||
this.rectW = Math.max.apply(Math, arr_x) - this.rectX;
|
||||
this.rectH = Math.max.apply(Math, arr_y) - this.rectY;
|
||||
}
|
||||
|
||||
MoveInGroupState.prototype =
|
||||
|
||||
@ -383,10 +383,17 @@ function MoveShapeImageTrack(originalObject)
|
||||
{
|
||||
_xfrm.setOffX(this.x/scale_coefficients.cx + ch_off_x);
|
||||
_xfrm.setOffY(this.y/scale_coefficients.cy + ch_off_y);
|
||||
if (Asc.editor.getEditorId() === AscCommon.c_oEditorId.Spreadsheet)
|
||||
Asc.editor.addMacroStepData("SetDrawingPos", {from: this.originalObject.drawingBase.from, to: this.originalObject.drawingBase.to});
|
||||
if (Asc.editor.getEditorId() === AscCommon.c_oEditorId.Presentation)
|
||||
Asc.editor.addMacroStepData("SetDrawingPos", {x: this.x, y: this.y});
|
||||
|
||||
if (!this.originalObject.group) {
|
||||
if (Asc.editor.getEditorId() === AscCommon.c_oEditorId.Spreadsheet) {
|
||||
let drawingBase = this.originalObject.drawingBase;
|
||||
if (drawingBase) {
|
||||
Asc.editor.addMacroStepData("SetDrawingPos", {from: drawingBase.from, to: drawingBase.to});
|
||||
}
|
||||
}
|
||||
if (Asc.editor.getEditorId() === AscCommon.c_oEditorId.Presentation)
|
||||
Asc.editor.addMacroStepData("SetDrawingPos", {x: this.x, y: this.y});
|
||||
}
|
||||
|
||||
if (this.originalObject.txXfrm) {
|
||||
var previousTxXfrmX = this.originalObject.txXfrm.offX;
|
||||
|
||||
Reference in New Issue
Block a user