@@ -52,6 +52,10 @@ var CellSelection = Feature.extend('CellSelection', {
52
52
handleMouseUp : function ( grid , event ) {
53
53
if ( this . dragging ) {
54
54
this . dragging = false ;
55
+ if ( this . dragSelect ) {
56
+ grid . selectionChanged ( false ) ;
57
+ this . dragSelect = false
58
+ }
55
59
}
56
60
if ( this . next ) {
57
61
this . next . handleMouseUp ( grid , event ) ;
@@ -95,8 +99,10 @@ var CellSelection = Feature.extend('CellSelection', {
95
99
if ( this . dragging && grid . properties . cellSelection && ! event . primitiveEvent . detail . isRightClick ) {
96
100
this . currentDrag = event . primitiveEvent . detail . mouse ;
97
101
this . lastDragCell = grid . newPoint ( event . gridCell . x , event . dataCell . y ) ;
102
+
103
+ this . dragSelect = true
98
104
this . checkDragScroll ( grid , this . currentDrag ) ;
99
- this . handleMouseDragCellSelection ( grid , this . lastDragCell , event . primitiveEvent . detail . keys ) ;
105
+ this . handleMouseDragCellSelection ( grid , this . lastDragCell , event . primitiveEvent . detail . keys , true ) ;
100
106
} else if ( this . next ) {
101
107
this . next . handleMouseDrag ( grid , event ) ;
102
108
}
@@ -144,7 +150,7 @@ var CellSelection = Feature.extend('CellSelection', {
144
150
* @param {Object } mouse - the event details
145
151
* @param {Array } keys - array of the keys that are currently pressed down
146
152
*/
147
- handleMouseDragCellSelection : function ( grid , gridCell , keys ) {
153
+ handleMouseDragCellSelection : function ( grid , gridCell , keys , silent ) {
148
154
var x = Math . max ( 0 , gridCell . x ) ,
149
155
y = Math . max ( 0 , gridCell . y ) ,
150
156
previousDragExtent = grid . getDragExtent ( ) ,
@@ -158,7 +164,7 @@ var CellSelection = Feature.extend('CellSelection', {
158
164
159
165
grid . clearMostRecentSelection ( ) ;
160
166
161
- grid . select ( mouseDown . x , mouseDown . y , newX , newY ) ;
167
+ grid . select ( mouseDown . x , mouseDown . y , newX , newY , silent ) ;
162
168
grid . setDragExtent ( grid . newPoint ( newX , newY ) ) ;
163
169
164
170
grid . repaint ( ) ;
0 commit comments