mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
fix: mutator coordinates not respecting flyout (#7690)
* fix: mutator coordinates not respecting flyout * chore: fixup conditionals
This commit is contained in:
@@ -382,6 +382,21 @@ export class HorizontalFlyout extends Flyout {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(#7689): Remove this.
|
||||
// Workspace with no scrollbars where this is permanently open on the top.
|
||||
// If scrollbars exist they properly update the metrics.
|
||||
if (
|
||||
!this.targetWorkspace.scrollbar &&
|
||||
!this.autoClose &&
|
||||
this.targetWorkspace.getFlyout() === this &&
|
||||
this.toolboxPosition_ === toolbox.Position.TOP
|
||||
) {
|
||||
this.targetWorkspace.translate(
|
||||
this.targetWorkspace.scrollX,
|
||||
this.targetWorkspace.scrollY + flyoutHeight,
|
||||
);
|
||||
}
|
||||
|
||||
this.height_ = flyoutHeight;
|
||||
this.position();
|
||||
this.targetWorkspace.resizeContents();
|
||||
|
||||
@@ -375,6 +375,22 @@ export class VerticalFlyout extends Flyout {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(#7689): Remove this.
|
||||
// Workspace with no scrollbars where this is permanently
|
||||
// open on the left.
|
||||
// If scrollbars exist they properly update the metrics.
|
||||
if (
|
||||
!this.targetWorkspace.scrollbar &&
|
||||
!this.autoClose &&
|
||||
this.targetWorkspace.getFlyout() === this &&
|
||||
this.toolboxPosition_ === toolbox.Position.LEFT
|
||||
) {
|
||||
this.targetWorkspace.translate(
|
||||
this.targetWorkspace.scrollX + flyoutWidth,
|
||||
this.targetWorkspace.scrollY,
|
||||
);
|
||||
}
|
||||
|
||||
this.width_ = flyoutWidth;
|
||||
this.position();
|
||||
this.targetWorkspace.resizeContents();
|
||||
|
||||
Reference in New Issue
Block a user