fix: Fix positioning of pasted blocks and comments in RTL. (#9302)

* fix: Fix positioning of pasted blocks in RTL.

* fix: Clean up after temporarily making the workspace RTL.

* fix: Remove .only.

* fix: Fix positioning of pasted comments in RTL.

* fix: Fix positioning of text preview on collapsed comments in RTL.
This commit is contained in:
Aaron Dodson
2025-08-19 08:32:31 -07:00
committed by GitHub
parent b5343f3c88
commit 405f7da280
4 changed files with 59 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ export function saveWorkspaceComment(
if (!skipId) elem.setAttribute('id', comment.id);
const workspace = comment.workspace;
const loc = comment.getRelativeToSurfaceXY();
const loc = comment.getRelativeToSurfaceXY().clone();
loc.x = workspace.RTL ? workspace.getWidth() - loc.x : loc.x;
elem.setAttribute('x', `${loc.x}`);
elem.setAttribute('y', `${loc.y}`);