Skip to content

Commit

Permalink
chore: clean up measurement code in mini workspace bubble (#7408)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-fenichel authored Aug 17, 2023
1 parent 82f6ca5 commit 60aa99a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions core/bubbles/mini_workspace_bubble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,10 @@ export class MiniWorkspaceBubble extends Bubble {
* Calculates the size of the mini workspace for use in resizing the bubble.
*/
private calculateWorkspaceSize(): Size {
// TODO (#7104): Clean this up to be more readable and unified for RTL
// vs LTR.
const canvas = this.miniWorkspace.getCanvas();
const workspaceSize = canvas.getBBox();
let width = workspaceSize.width + workspaceSize.x;
const workspaceSize = this.miniWorkspace.getCanvas().getBBox();
let width = workspaceSize.width + MiniWorkspaceBubble.MARGIN;
let height = workspaceSize.height + MiniWorkspaceBubble.MARGIN;

const flyout = this.miniWorkspace.getFlyout();
if (flyout) {
const flyoutScrollMetrics = flyout
Expand All @@ -233,10 +231,6 @@ export class MiniWorkspaceBubble extends Bubble {
height = Math.max(height, flyoutScrollMetrics.height + 20);
width += flyout.getWidth();
}
if (this.miniWorkspace.RTL) {
width = -workspaceSize.x;
}
width += MiniWorkspaceBubble.MARGIN;
return new Size(width, height);
}

Expand Down

0 comments on commit 60aa99a

Please sign in to comment.