File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -573,6 +573,8 @@ public int currentPageX
573573 if ( ! _pageMode )
574574 return ;
575575
576+ _owner . EnsureBoundsCorrect ( ) ;
577+
576578 if ( _overlapSize . x > 0 )
577579 this . SetPosX ( value * _pageSize . x , false ) ;
578580 }
@@ -585,6 +587,11 @@ public int currentPageX
585587 /// <param name="ani">是否使用缓动到达目标。</param>
586588 public void SetCurrentPageX ( int value , bool ani )
587589 {
590+ if ( ! _pageMode )
591+ return ;
592+
593+ _owner . EnsureBoundsCorrect ( ) ;
594+
588595 if ( _overlapSize . x > 0 )
589596 this . SetPosX ( value * _pageSize . x , ani ) ;
590597 }
@@ -607,6 +614,11 @@ public int currentPageY
607614 }
608615 set
609616 {
617+ if ( ! _pageMode )
618+ return ;
619+
620+ _owner . EnsureBoundsCorrect ( ) ;
621+
610622 if ( _overlapSize . y > 0 )
611623 this . SetPosY ( value * _pageSize . y , false ) ;
612624 }
@@ -619,6 +631,11 @@ public int currentPageY
619631 /// <param name="ani">是否使用缓动到达目标。</param>
620632 public void SetCurrentPageY ( int value , bool ani )
621633 {
634+ if ( ! _pageMode )
635+ return ;
636+
637+ _owner . EnsureBoundsCorrect ( ) ;
638+
622639 if ( _overlapSize . y > 0 )
623640 this . SetPosY ( value * _pageSize . y , ani ) ;
624641 }
You can’t perform that action at this time.
0 commit comments