File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,30 +21,25 @@ var PreRender = function ()
2121 {
2222 var bounds = this . _bounds ;
2323
24- // width = bounds.width;
25- // height = bounds.height;
26-
27- // var boundsX = bounds.x;
28- // var boundsY = bounds.y;
29- // var boundsR = Math.max(bounds.right - width, width);
30- // var boundsB = Math.max(bounds.bottom - height, height);
24+ var bw = Math . max ( 0 , bounds . right - width ) ;
25+ var bh = Math . max ( 0 , bounds . bottom - height ) ;
3126
3227 if ( this . scrollX < bounds . x )
3328 {
3429 this . scrollX = bounds . x ;
3530 }
36- else if ( this . scrollX > bounds . right )
31+ else if ( this . scrollX > bw )
3732 {
38- this . scrollX = bounds . right ;
33+ this . scrollX = bw ;
3934 }
4035
4136 if ( this . scrollY < bounds . y )
4237 {
4338 this . scrollY = bounds . y ;
4439 }
45- else if ( this . scrollY > bounds . bottom )
40+ else if ( this . scrollY > bh )
4641 {
47- this . scrollY = bounds . bottom ;
42+ this . scrollY = bh ;
4843 }
4944 }
5045
You can’t perform that action at this time.
0 commit comments