${isOrbit ? 'Orbit' : 'Look Around'}
${HelpMain.leftClick}Left-click and drag
Or.
${HelpMain.oneFinger}One-finger drag
Or.
${isOrbit ? HelpMain.arrowKeys : HelpMain.arrowKeysLR}Arrow keys
${!isOrbit ? fpTileOption : null}
Pan
${HelpMain.rightClick}Right-click and drag
Or.
${HelpMain.twoFinger}Two-finger drag
Or.
Shift + ${HelpMain.arrowKeys}Arrow keys
${isOrbit ? 'Zoom' : 'Forward/Backward'}
${HelpMain.mouseWheel}Mouse wheel
Or.
${HelpMain.pinch}Two-finger pinch
Or.
${isOrbit ? 'Ctrl + ' : ''}${isOrbit ? HelpMain.arrowKeys : HelpMain.arrowKeysUD}Arrow keys
`;
const menuContent = html`The tools below can be accessed by clicking the corresponding icons on the menu bar to the left of the screen.
${arVisible ? html`
Launch an augmented
reality experience.
`:""}
${audioVisible ? html`
Hear an audio
narration of the scene.
`:""}
${toursVisible ? html`
Take a curated guided
tour of the scene.
`:""}
${readerVisible ? html`
Read articles about
the scene content.
`:""}
${annosVisible ? html`
Show annotations
highlighting key points.
`:""}
Share the experience
with a friend!
${fsVisible ? html`
View the experience
in fullscreen mode.
`:""}
${toolsVisible ? html`
Open the advanced
tool menu.
`:""}
`;
return html`
this.onKeyDownMain(e)}>
${language.getLocalizedString("Introduction to Voyager")}
this.onClickSection(e, EHelpSection.Nav)}>
this.onClickSection(e, EHelpSection.Menu)}>
${section === EHelpSection.Nav ? navContent : menuContent}
`;
}
protected firstUpdated(changedProperties) {
super.firstUpdated(changedProperties);
(Array.from(this.getElementsByClassName("ff-button")).find(elem => elem.getAttribute("text") === "Navigation") as HTMLElement).focus();
// trigger screen reader on first pass
setTimeout(() => {this.querySelector("#sr-trigger").textContent = "section end"}, 100);
}
protected onClickSection(event: IButtonClickEvent, idx: number)
{
this.helpView = idx;
this.requestUpdate();
}
protected onKeyDownMain(e: KeyboardEvent)
{
if (e.code === "Escape") {
this.close();
}
else if(e.code === "Tab") {
focusTrap(getFocusableElements(this) as HTMLElement[], e);
}
}
// resets tabIndex if needed
protected tabReset(e: FocusEvent) {
const currentActive = e.target instanceof Element ? e.target as Element : null;
if(currentActive) {
const currentSelected = Array.from(currentActive.parentElement.children).find(elem => elem.hasAttribute("selected"));
if(currentSelected !== currentActive) {
currentActive.setAttribute("tabIndex", "-1");
currentSelected.setAttribute("tabIndex", "0");
}
}
}
}