File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -199,11 +199,6 @@ export default function useAlign(
199199 Math . round ( ( eleRect . height / eleOutHeight ) * 1000 ) / 1000 ,
200200 ) ;
201201
202- // No need to align since it's not visible in view
203- if ( scaleX === 0 || scaleY === 0 ) {
204- return ;
205- }
206-
207202 const eleScrollWidth = ( eleOutWidth - eleInnerWidth ) * scaleX ;
208203 const eleScrollHeight = ( eleOutHeight - eleInnerHeight ) * scaleY ;
209204 const eleRight = eleRect . x + eleRect . width - eleScrollWidth ;
@@ -227,6 +222,11 @@ export default function useAlign(
227222 Math . round ( ( popupHeight / parseFloat ( height ) ) * 1000 ) / 1000 ,
228223 ) ;
229224
225+ // No need to align since it's not visible in view
226+ if ( scaleX === 0 || scaleY === 0 ) {
227+ return ;
228+ }
229+
230230 // Offset
231231 const { offset, targetOffset } = placementInfo ;
232232 const [ popupOffsetX = 0 , popupOffsetY = 0 ] = offset || [ ] ;
You can’t perform that action at this time.
0 commit comments