| 98954 | var _vegaUtil = require("vega-util"); |
| 98955 | |
| 98956 | function pick(test) { |
| 98957 | test = test || _vegaUtil.truthy; |
| 98958 | return function (context, scene, x, y, gx, gy) { |
| 98959 | x *= context.pixelRatio; |
| 98960 | y *= context.pixelRatio; |
| 98961 | return (0, _visit.pickVisit)(scene, function (item) { |
| 98962 | var b = item.bounds; // first hit test against bounding box |
| 98963 | |
| 98964 | if (b && !b.contains(gx, gy) || !b) return; // if in bounding box, perform more careful test |
| 98965 | |
| 98966 | if (test(context, item, x, y, gx, gy)) return item; |
| 98967 | }); |
| 98968 | }; |
| 98969 | } |
| 98970 | |
| 98971 | function hitPath(path, filled) { |
| 98972 | return function (context, o, x, y) { |