Skip to content

Commit

Permalink
[se] Fix by scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Nov 21, 2024
1 parent 1301d3a commit 4e470be
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cell/view/WorksheetView.js
Original file line number Diff line number Diff line change
Expand Up @@ -10824,14 +10824,14 @@
ctxW - (this._getColLeft(oldEnd) - leftOldStart + this.cellsLeft + diffWidth) : 0;


this._startRtlRendering();
this._startRtlRendering(null);
this._startRtlDrawingRendering();


// Перемещаем область
var moveWidth = oldW - lastColWidth;
if (moveWidth > 0) {
ctx.drawImage(ctx.getCanvas(), x + this.getRightToLeftOffset(), y, moveWidth, ctxH, x - dx + this.getRightToLeftOffset(), y, moveWidth, ctxH);
this._drawImage(ctx, ctx.getCanvas(), x + this.getRightToLeftOffset(), y, moveWidth, ctxH, x - dx + this.getRightToLeftOffset(), y, moveWidth, ctxH);

// Заглушка для safari (http://bugzilla.onlyoffice.com/show_bug.cgi?id=25546). Режим 'copy' сначала затирает, а
// потом рисует (а т.к. мы рисуем сами на себе, то уже картинка будет пустой)
Expand Down Expand Up @@ -26835,8 +26835,11 @@
sheetViewSettings.rightToLeft = val;
};

WorksheetView.prototype._startRtlRendering = function (ctx) {
return;
WorksheetView.prototype._startRtlRendering = function (ctx, test) {
if (!test) {
return;
}

if (!ctx) {
ctx = this.drawingCtx;
}
Expand Down Expand Up @@ -26998,6 +27001,10 @@
ctx.strokeRect(this.getRightToLeft() ? (this.getCtxWidth(ctx) - x - w) : x, y, w, h);
return ctx;
};
WorksheetView.prototype._drawImage = function (ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
ctx.drawImage(img, this.getRightToLeft() ? (this.getCtxWidth(ctx) - sx - sw) : sx, sy, sw, sh, this.getRightToLeft() ? (this.getCtxWidth(ctx) - dx - dw) : dx, dy, dw, dh);
return ctx;
};


function CRenderingSettings() {
Expand Down

0 comments on commit 4e470be

Please sign in to comment.