diff --git a/typescript/packages/subsurface-viewer/src/SubsurfaceViewer.tsx b/typescript/packages/subsurface-viewer/src/SubsurfaceViewer.tsx index 42715471b..f659efc29 100644 --- a/typescript/packages/subsurface-viewer/src/SubsurfaceViewer.tsx +++ b/typescript/packages/subsurface-viewer/src/SubsurfaceViewer.tsx @@ -312,6 +312,11 @@ SubsurfaceViewer.propTypes = { * Validate JSON datafile against schema */ checkDatafileSchema: PropTypes.bool, + + /** + * Extra pixels around the pointer to include while picking. + */ + pickingRadius: PropTypes.number, }; export default SubsurfaceViewer; diff --git a/typescript/packages/subsurface-viewer/src/components/Map.tsx b/typescript/packages/subsurface-viewer/src/components/Map.tsx index cc588422e..3e5f2d4d9 100644 --- a/typescript/packages/subsurface-viewer/src/components/Map.tsx +++ b/typescript/packages/subsurface-viewer/src/components/Map.tsx @@ -378,6 +378,11 @@ export interface MapProps { * an event listener. */ innerRef?: React.Ref; + + /** + * Extra pixels around the pointer to include while picking. + */ + pickingRadius?: number; } function defaultTooltip(info: PickingInfo) { @@ -415,6 +420,7 @@ const Map: React.FC = ({ triggerResetMultipleWells, verticalScale, innerRef, + pickingRadius, }: MapProps) => { // From react doc, ref should not be read nor modified during rendering. const deckRef = React.useRef(null); @@ -825,6 +831,7 @@ const Map: React.FC = ({ onDragStart={onDragStart} onDragEnd={onDragEnd} onResize={onResize} + pickingRadius={pickingRadius} > {children}