added flag for enable RayTrace finder (#58)
* added feature flag for enable Raycast focus finder
This commit is contained in:
Родитель
3add8517ed
Коммит
095876959f
|
@ -234,6 +234,7 @@ function isNodeAttached(node: HTMLElement, root: HTMLElement) {
|
|||
|
||||
@Injectable()
|
||||
export class FocusService {
|
||||
public enableRaycast = true;
|
||||
// Focus root, the service operates below here.
|
||||
private root: HTMLElement;
|
||||
public focusRoot: HTMLElement = defaultFocusRoot;
|
||||
|
@ -382,7 +383,9 @@ export class FocusService {
|
|||
const directional = isDirectional(direction);
|
||||
let element: HTMLElement;
|
||||
if (directional) {
|
||||
element = this.findNextFocusByRaycast(direction);
|
||||
if (this.enableRaycast) {
|
||||
element = this.findNextFocusByRaycast(direction);
|
||||
}
|
||||
if (!element) {
|
||||
element = this.findNextFocus(direction);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче