fix: apply review findings; make ops strip text CSS-generated
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { onMounted, onUnmounted, type Ref } from 'vue';
|
||||
import { onMounted, onUnmounted, watch, type Ref } from 'vue';
|
||||
|
||||
const SURFACES = '.project-case-study, .project-card, .contact-destination, .infrastructure-flow-figure';
|
||||
|
||||
@@ -37,6 +37,12 @@ export function useHeadlight(enabled: Ref<boolean>): void {
|
||||
if (frame === 0) frame = requestAnimationFrame(flush);
|
||||
};
|
||||
|
||||
watch(enabled, (value) => {
|
||||
if (value) return;
|
||||
active = false;
|
||||
delete document.documentElement.dataset.headlight;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (!window.matchMedia('(pointer: fine)').matches) return;
|
||||
window.addEventListener('pointermove', onMove, { passive: true });
|
||||
|
||||
Reference in New Issue
Block a user