useElementByPoint

Reactive elementByPoint

Usage

const { const element: Signal<HTMLElement | null>element } = useElementByPoint<false>(options: useElementByPointOptions<false>): UseElementByPointReturn<false>useElementByPoint({
  x: numberx: 
const mouse: Signal<{
    x: number;
    y: number;
}>
mouse
.
Signal<{ x: number; y: number; }>.value: {
    x: number;
    y: number;
}
value
.x: numberx,
y: numbery:
const mouse: Signal<{
    x: number;
    y: number;
}>
mouse
.
Signal<{ x: number; y: number; }>.value: {
    x: number;
    y: number;
}
value
.y: numbery,
multiple?: false | undefinedmultiple: false, immediate?: boolean | undefinedimmediate: true, }) type
type UseElementByPointReturn<M extends boolean = false> = {
    element: M extends true ? Signal<HTMLElement[]> : Signal<HTMLElement | null>;
    start: () => void;
    stop: () => void;
    isActive: boolean;
}
UseElementByPointReturn
<function (type parameter) M in type UseElementByPointReturn<M extends boolean = false>M extends boolean = false> = {
element: M extends true ? Signal<HTMLElement[]> : Signal<HTMLElement | null>element: function (type parameter) M in type UseElementByPointReturn<M extends boolean = false>M extends true ? class Signal<T>Signal<HTMLElement[]> : class Signal<T>Signal<HTMLElement | null> start: () => voidstart: () => void stop: () => voidstop: () => void isActive: booleanisActive: boolean }