← Commit history

Merge PR #221: adom-3d: show the Shift+Alt hint once, not twice

John Lauer ·781b10b877 ·9d ago ·parent 7e63116
1 file changed +4
widgets/model-3d-widget.js+4
@@ -55,6 +55,10 @@       this.attachShadow({ mode: 'open' });       // in a wiki frame: no page margin, and nothing the viewer adds (its tip bubble) may give the frame a scrollbar       if (window.self !== window.top) { document.documentElement.style.overflow = 'hidden'; document.body.style.margin = '0'; }+      // the viewer shows the same Shift+Alt hint twice on first load (its pivot chip and its help tip; in a frame the+      // "seen" flag cannot persist, so both return every time): keep the chip only as the live "keys held" indicator+      if (!document.getElementById('adom-3d-hint')) { const st = document.createElement('style'); st.id = 'adom-3d-hint';+        st.textContent = '.viewer-container:not(.pivot-mode) .pivot-chip { display: none !important; }'; document.head.appendChild(st); }       this._src = this.getAttribute('src');       this._poster = this.getAttribute('poster');       this._idle();