Skip to content

Commit 45cc1e8

Browse files
authored
fix: mutator coordinates not respecting flyout (#7690)
* fix: mutator coordinates not respecting flyout * chore: fixup conditionals
1 parent 0836a1d commit 45cc1e8

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

core/flyout_horizontal.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,21 @@ export class HorizontalFlyout extends Flyout {
382382
}
383383
}
384384

385+
// TODO(#7689): Remove this.
386+
// Workspace with no scrollbars where this is permanently open on the top.
387+
// If scrollbars exist they properly update the metrics.
388+
if (
389+
!this.targetWorkspace.scrollbar &&
390+
!this.autoClose &&
391+
this.targetWorkspace.getFlyout() === this &&
392+
this.toolboxPosition_ === toolbox.Position.TOP
393+
) {
394+
this.targetWorkspace.translate(
395+
this.targetWorkspace.scrollX,
396+
this.targetWorkspace.scrollY + flyoutHeight,
397+
);
398+
}
399+
385400
this.height_ = flyoutHeight;
386401
this.position();
387402
this.targetWorkspace.resizeContents();

core/flyout_vertical.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,22 @@ export class VerticalFlyout extends Flyout {
375375
}
376376
}
377377

378+
// TODO(#7689): Remove this.
379+
// Workspace with no scrollbars where this is permanently
380+
// open on the left.
381+
// If scrollbars exist they properly update the metrics.
382+
if (
383+
!this.targetWorkspace.scrollbar &&
384+
!this.autoClose &&
385+
this.targetWorkspace.getFlyout() === this &&
386+
this.toolboxPosition_ === toolbox.Position.LEFT
387+
) {
388+
this.targetWorkspace.translate(
389+
this.targetWorkspace.scrollX + flyoutWidth,
390+
this.targetWorkspace.scrollY,
391+
);
392+
}
393+
378394
this.width_ = flyoutWidth;
379395
this.position();
380396
this.targetWorkspace.resizeContents();

0 commit comments

Comments
 (0)