2b08bd5452
* fix(ui-components): use basic anchor if external=true * moved layout components to ui-components * integrated new components into fe-2
26 lines
594 B
TypeScript
26 lines
594 B
TypeScript
export {
|
|
ThrottleOrDebounce,
|
|
HorizontalDirection,
|
|
useWindowResizeHandler,
|
|
useOnBeforeWindowUnload,
|
|
useResponsiveHorizontalDirectionCalculation
|
|
} from '@speckle/ui-components'
|
|
|
|
export function useDisableGlobalTextSelection() {
|
|
const disableTextSelection = ref(false)
|
|
|
|
if (process.client) {
|
|
watch(disableTextSelection, (newVal, oldVal) => {
|
|
if (!!newVal === !!oldVal) return
|
|
|
|
if (newVal) {
|
|
document.body.classList.add('select-none')
|
|
} else {
|
|
document.body.classList.remove('select-none')
|
|
}
|
|
})
|
|
}
|
|
|
|
return { disableTextSelection }
|
|
}
|