@ -2366,16 +2366,24 @@ class App extends React.Component<AppProps, AppState> {
}
return (
element . link &&
isPointHittingLinkIcon ( element , this . state , [
scenePointer . x ,
scenePointer . y ,
] ) &&
isPointHittingLinkIcon (
element ,
this . state ,
[ scenePointer . x , scenePointer . y ] ,
this . isMobile ,
) &&
index <= hitElementIndex
) ;
} ) ;
} ;
private redirectToLink = ( ) = > {
if (
this . lastPointerDown ! . clientX !== this . lastPointerUp ! . clientX ||
this . lastPointerDown ! . clientY !== this . lastPointerUp ! . clientY
) {
return ;
}
const lastPointerDownCoords = viewportCoordsToSceneCoords (
this . lastPointerDown ! ,
this . state ,
@ -2384,6 +2392,7 @@ class App extends React.Component<AppProps, AppState> {
this . hitLinkElement ! ,
this . state ,
[ lastPointerDownCoords . x , lastPointerDownCoords . y ] ,
this . isMobile ,
) ;
const lastPointerUpCoords = viewportCoordsToSceneCoords (
this . lastPointerUp ! ,
@ -2393,6 +2402,7 @@ class App extends React.Component<AppProps, AppState> {
this . hitLinkElement ! ,
this . state ,
[ lastPointerUpCoords . x , lastPointerUpCoords . y ] ,
this . isMobile ,
) ;
if ( lastPointerDownHittingLinkIcon && LastPointerUpHittingLinkIcon ) {
const url = this . hitLinkElement ? . link ;
@ -3238,10 +3248,12 @@ class App extends React.Component<AppProps, AppState> {
if ( pointerDownState . hit . element ) {
// Early return if pointer is hitting link icon
if (
isPointHittingLinkIcon ( pointerDownState . hit . element , this . state , [
pointerDownState . origin . x ,
pointerDownState . origin . y ,
] )
isPointHittingLinkIcon (
pointerDownState . hit . element ,
this . state ,
[ pointerDownState . origin . x , pointerDownState . origin . y ] ,
this . isMobile ,
)
) {
return false ;
}