UNPKG

victory-native

Version:

A charting library for React Native with a focus on performance and customization.

10 lines (9 loc) 463 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getClosestDatumIndex = void 0; const findClosestPoint_1 = require("../../utils/findClosestPoint"); const getClosestDatumIndex = ({ orientation, categoryPositions, touchX, touchY, }) => { "worklet"; return (0, findClosestPoint_1.findClosestPoint)(categoryPositions, orientation === "horizontal" ? touchY : touchX); }; exports.getClosestDatumIndex = getClosestDatumIndex;