mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
fix: workspace comment bounding box affecting RTL zoom (#8125)
This commit is contained in:
@@ -124,7 +124,16 @@ export class RenderedWorkspaceComment
|
||||
getBoundingRectangle(): Rect {
|
||||
const loc = this.getRelativeToSurfaceXY();
|
||||
const size = this.getSize();
|
||||
return new Rect(loc.y, loc.y + size.height, loc.x, loc.x + size.width);
|
||||
let left;
|
||||
let right;
|
||||
if (this.workspace.RTL) {
|
||||
left = loc.x - size.width;
|
||||
right = loc.x;
|
||||
} else {
|
||||
left = loc.x;
|
||||
right = loc.x + size.width;
|
||||
}
|
||||
return new Rect(loc.y, loc.y + size.height, left, right);
|
||||
}
|
||||
|
||||
/** Move the comment by the given amounts in workspace coordinates. */
|
||||
|
||||
Reference in New Issue
Block a user