mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
fix: Make flyout navigation respect the cursor's looping setting (#9520)
This commit is contained in:
@@ -60,6 +60,9 @@ export class FlyoutNavigationPolicy<T> implements INavigationPolicy<T> {
|
||||
if (index === -1) return null;
|
||||
index++;
|
||||
if (index >= flyoutContents.length) {
|
||||
if (!this.flyout.getWorkspace().getCursor().getNavigationLoops()) {
|
||||
return null;
|
||||
}
|
||||
index = 0;
|
||||
}
|
||||
|
||||
@@ -83,6 +86,9 @@ export class FlyoutNavigationPolicy<T> implements INavigationPolicy<T> {
|
||||
if (index === -1) return null;
|
||||
index--;
|
||||
if (index < 0) {
|
||||
if (!this.flyout.getWorkspace().getCursor().getNavigationLoops()) {
|
||||
return null;
|
||||
}
|
||||
index = flyoutContents.length - 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user