+
+ // Start section selection mode on button press
+ DOM.onSelect(this.sectionModeButton, this.enterSectionSelectMode.bind(this));
+
+ // Toggle between pointer modes
+ DOM.onSelect(this.modeToggles, event => {
+ for (const section of this.modeSections) {
+ const show = !section.contains(event.target);
+ section.toggleAttribute('hidden', !show);
+ }
+
+ this.modeToggles.find(b => b !== event.target).focus();
+ });