File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,16 @@ SOFTWARE.
48
48
cm . on ( "mousedown" , $ . bind ( this , this . onMouseDown ) ) ;
49
49
} ;
50
50
51
- p . onMouseDown = function ( evt ) {
52
- if ( evt . which != 1 ) { return ; }
53
- this . onMouseMove ( ) ; // clear current
54
- this . isMouseDown = true ;
55
- ( window . addEventListener ? window : document ) . addEventListener ( "mouseup" , $ . bind ( this , this . onMouseUp ) ) ;
51
+ p . onMouseDown = function ( cm , evt ) {
52
+ if ( evt . which == 1 || evt . button == 1 ) {
53
+ this . onMouseMove ( ) ; // clear current
54
+ this . isMouseDown = true ;
55
+ ( window . addEventListener ? window : document ) . addEventListener ( "mouseup" , $ . bind ( this , this . onMouseUp ) ) ;
56
+ }
56
57
} ;
57
58
58
59
p . onMouseUp = function ( evt ) {
59
- if ( evt . which != 1 ) { return ; }
60
- this . isMouseDown = false ;
60
+ if ( evt . button == 1 || evt . which == 1 ) { this . isMouseDown = false ; }
61
61
} ;
62
62
63
63
p . onMouseMove = function ( evt ) {
You can’t perform that action at this time.
0 commit comments