Skip to content

Commit 77092e7

Browse files
committed
Merge pull request #1296 from pandamicro/develop
Closed #3342: UIWidget's container intercept touch event while they can't
2 parents 57ceb6b + 24991e2 commit 77092e7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIListView.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ ccs.UIListView = ccs.UILayout.extend(/** @lends ccs.UIListView# */{
440440
* @param {cc.Point} touchPoint
441441
*/
442442
checkChildInfo: function (handleState, sender, touchPoint) {
443-
this.interceptTouchEvent(handleState, sender, touchPoint);
443+
if(this._enabled && this._touchEnabled)
444+
this.interceptTouchEvent(handleState, sender, touchPoint);
444445
},
445446

446447
moveChildren: function (offset) {

extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIPageView.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,8 @@ ccs.UIPageView = ccs.UILayout.extend(/** @lends ccs.UIPageView# */{
502502
},
503503

504504
checkChildInfo: function (handleState, sender, touchPoint) {
505-
this.interceptTouchEvent(handleState, sender, touchPoint);
505+
if(this._enabled && this._touchEnabled)
506+
this.interceptTouchEvent(handleState, sender, touchPoint);
506507
},
507508

508509
interceptTouchEvent: function (handleState, sender, touchPoint) {

extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,8 @@ ccs.UIScrollView = ccs.UILayout.extend(/** @lends ccs.UIScrollView# */{
13091309
* @param {cc.Point} touchPoint
13101310
*/
13111311
checkChildInfo: function (handleState, sender, touchPoint) {
1312-
this.interceptTouchEvent(handleState, sender, touchPoint);
1312+
if(this._enabled && this._touchEnabled)
1313+
this.interceptTouchEvent(handleState, sender, touchPoint);
13131314
},
13141315

13151316
scrollToTopEvent: function () {

0 commit comments

Comments
 (0)