remove unused logic

This commit is contained in:
zilongshanren
2016-06-08 17:32:56 +08:00
parent e05160ac22
commit 303cd014c3
2 changed files with 1 additions and 24 deletions
-4
View File
@@ -357,10 +357,6 @@ var Button = cc.Class({
this.node.on(cc.Node.EventType.MOUSE_LEAVE, this._onMouseMoveOut, this);
},
_cancelButtonClick: function(){
this._pressed = false;
},
_applyTarget: function () {
var target = this.target;
if (target) {
+1 -20
View File
@@ -787,32 +787,13 @@ var ScrollView = cc.Class({
this._touchMoved = false;
},
_cancelButtonClick: function(touch) {
var deltaMove = touch.getDelta();
var needCancelTouch = false;
if (cc.sys.isMobile) {
//FIXME: touch move delta should be calculated by DPI.
var TOUCH_CANCEL_POINT = 7;
if (cc.pLength(deltaMove) > TOUCH_CANCEL_POINT) {
needCancelTouch = true;
}
} else {
needCancelTouch = true;
}
return needCancelTouch;
},
_onTouchMoved: function(event) {
var touch = event.touch;
if (this.content) {
var buttonComponent = event.target.getComponent(cc.Button);
if (buttonComponent && this._cancelButtonClick(touch)) {
buttonComponent._cancelButtonClick();
}
this._handleMoveLogic(touch);
}
var deltaMove = touch.getDelta();
//FIXME: touch move delta should be calculated by DPI.
if (cc.pLength(deltaMove) > 7) {
this._touchMoved = true;
}