@@ -653,10 +653,12 @@ cc.EGLView = cc.Class.extend(/** @lends cc.EGLView# */{
653
653
var ys = [ ] ;
654
654
655
655
var i = 0 ;
656
+ var touch ;
656
657
for ( var j = 0 ; j < touches . length ; j ++ ) {
657
- ids [ i ] = j ;
658
- xs [ i ] = touches [ j ] . getLocation ( ) . x ;
659
- ys [ i ] = touches [ j ] . getLocation ( ) . y ;
658
+ touch = touches [ j ] ;
659
+ ids [ i ] = touch . getId ( ) || j ;
660
+ xs [ i ] = touch . getLocation ( ) . x ;
661
+ ys [ i ] = touch . getLocation ( ) . y ;
660
662
++ i ;
661
663
}
662
664
this . handleTouchesBegin ( i , ids , xs , ys ) ;
@@ -668,10 +670,12 @@ cc.EGLView = cc.Class.extend(/** @lends cc.EGLView# */{
668
670
var ys = [ ] ;
669
671
670
672
var i = 0 ;
673
+ var touch ;
671
674
for ( var j = 0 ; j < touches . length ; j ++ ) {
672
- ids [ i ] = j ;
673
- xs [ i ] = touches [ j ] . getLocation ( ) . x ;
674
- ys [ i ] = touches [ j ] . getLocation ( ) . y ;
675
+ touch = touches [ j ] ;
676
+ ids [ i ] = touch . getId ( ) || j ;
677
+ xs [ i ] = touch . getLocation ( ) . x ;
678
+ ys [ i ] = touch . getLocation ( ) . y ;
675
679
++ i ;
676
680
}
677
681
this . handleTouchesMove ( i , ids , xs , ys ) ;
@@ -683,10 +687,12 @@ cc.EGLView = cc.Class.extend(/** @lends cc.EGLView# */{
683
687
var ys = [ ] ;
684
688
685
689
var i = 0 ;
690
+ var touch ;
686
691
for ( var j = 0 ; j < touches . length ; j ++ ) {
687
- ids [ i ] = j ;
688
- xs [ i ] = touches [ j ] . getLocation ( ) . x ;
689
- ys [ i ] = touches [ j ] . getLocation ( ) . y ;
692
+ touch = touches [ j ] ;
693
+ ids [ i ] = touch . getId ( ) || j ;
694
+ xs [ i ] = touch . getLocation ( ) . x ;
695
+ ys [ i ] = touch . getLocation ( ) . y ;
690
696
++ i ;
691
697
}
692
698
this . handleTouchesEnd ( i , ids , xs , ys ) ;
@@ -698,10 +704,12 @@ cc.EGLView = cc.Class.extend(/** @lends cc.EGLView# */{
698
704
var ys = [ ] ;
699
705
700
706
var i = 0 ;
707
+ var touch ;
701
708
for ( var j = 0 ; j < touches . length ; j ++ ) {
702
- ids [ i ] = j ;
703
- xs [ i ] = touches [ j ] . getLocation ( ) . x ;
704
- ys [ i ] = touches [ j ] . getLocation ( ) . y ;
709
+ touch = touches [ j ] ;
710
+ ids [ i ] = touch . getId ( ) || j ;
711
+ xs [ i ] = touch . getLocation ( ) . x ;
712
+ ys [ i ] = touch . getLocation ( ) . y ;
705
713
++ i ;
706
714
}
707
715
this . handleTouchesCancel ( i , ids , xs , ys ) ;
0 commit comments