mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
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:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user