block-deco - fix horizontal scrolling issue (#175863)

This commit is contained in:
Johannes Rieken 2023-03-02 11:40:08 +01:00 committed by GitHub
parent 77c8e2eeda
commit 8ae0aea38f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,7 +107,7 @@ export class BlockDecorations extends ViewPart {
const [paddingTop, paddingRight, paddingBottom, paddingLeft] = decoration.options.blockPadding ?? [0, 0, 0, 0];
block.setClassName('blockDecorations-block ' + decoration.options.blockClassName);
block.setLeft(ctx.scrollLeft + this.contentLeft - paddingLeft);
block.setLeft(this.contentLeft - paddingLeft);
block.setWidth(this.contentWidth + paddingLeft + paddingRight);
block.setTop(top - ctx.scrollTop - paddingTop);
block.setHeight(bottom - top + paddingTop + paddingBottom);