File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
ccui/uiwidgets/scroll-widget
cocostudio/loader/parsers Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,8 @@ ccui.ScrollView = ccui.Layout.extend(/** @lends ccui.ScrollView# */{
303303 } ,
304304
305305 _isInContainer : function ( widget ) {
306+ if ( ! this . _clippingEnabled )
307+ return true ;
306308 var wPos = widget . _position ,
307309 wSize = widget . _contentSize ,
308310 wAnchor = widget . _anchorPoint ,
@@ -344,7 +346,7 @@ ccui.ScrollView = ccui.Layout.extend(/** @lends ccui.ScrollView# */{
344346 addChild : function ( widget , zOrder , tag ) {
345347 if ( ! widget )
346348 return false ;
347- if ( this . _clippingEnabled && this . _isInContainer ( widget ) === false )
349+ if ( this . _isInContainer ( widget ) === false )
348350 widget . _inViewRect = false ;
349351 zOrder = zOrder || widget . getLocalZOrder ( ) ;
350352 tag = tag || widget . getTag ( ) ;
@@ -417,7 +419,7 @@ ccui.ScrollView = ccui.Layout.extend(/** @lends ccui.ScrollView# */{
417419 this . _moveChildPoint . x = locContainer . x + offsetX ;
418420 this . _moveChildPoint . y = locContainer . y + offsetY ;
419421 this . _innerContainer . setPosition ( this . _moveChildPoint ) ;
420- if ( this . _clippingEnabled && this . _innerContainer . _children . length !== 0 )
422+ if ( this . _innerContainer . _children . length !== 0 )
421423 this . updateChildren ( ) ;
422424 } ,
423425
Original file line number Diff line number Diff line change 469469
470470 this . widgetAttributes ( widget , json ) ;
471471
472- var clipEnabled = json [ "ClipAble" ] ;
472+ var clipEnabled = json [ "ClipAble" ] || false ;
473473 if ( clipEnabled != null )
474474 widget . setClippingEnabled ( clipEnabled ) ;
475475
750750 widget . setBackGroundImage ( path , type ) ;
751751 } ) ;
752752
753- var clipEnabled = json [ "ClipAble" ] ;
753+ var clipEnabled = json [ "ClipAble" ] || false ;
754754 widget . setClippingEnabled ( clipEnabled ) ;
755755
756756 var colorType = getParam ( json [ "ComboBoxIndex" ] , 0 ) ;
You can’t perform that action at this time.
0 commit comments