@@ -255,8 +255,10 @@ require(['jquery', 'jquery.svg', 'jquery.svgdom'],
255
255
* When a table row is hovered over/clicked, highlight
256
256
*/
257
257
$ ( "tr" ) . not ( 'thead tr' ) . on ( {
258
- click : function ( ) {
259
- $ ( "polygon.selected, tr.selected" ) . removeClass ( "selected" ) ;
258
+ click : function ( event ) {
259
+ if ( ! event . ctrlKey ) {
260
+ $ ( "polygon.selected, tr.selected" ) . not ( $ ( this ) ) . removeClass ( "selected" ) ;
261
+ }
260
262
getGraphBox ( this ) . toggleClass ( "selected" ) ;
261
263
$ ( this ) . toggleClass ( "selected" ) ;
262
264
} ,
@@ -280,17 +282,20 @@ require(['jquery', 'jquery.svg', 'jquery.svgdom'],
280
282
// Find corresponding table row and return
281
283
return $ ( "tr" ) . filter ( function ( ) {
282
284
return $ ( this ) . find ( "td:first" ) . html ( ) == elementTitle ;
283
- } ) ;
285
+ } ) . add ( ) ;
284
286
}
285
287
286
288
/**
287
289
* When a graph box is hovered over/clicked, highlight
288
290
*/
289
291
$ ( document ) . on ( {
290
- click : function ( ) {
291
- $ ( "polygon.selected, tr.selected" ) . removeClass ( "selected" ) ;
292
+ click : function ( event ) {
293
+ var thisPolygon = $ ( this ) . find ( "polygon" ) ;
294
+ if ( ! event . ctrlKey ) {
295
+ $ ( "polygon.selected, tr.selected" ) . not ( thisPolygon ) . removeClass ( "selected" ) ;
296
+ }
292
297
getTableRow ( this ) . toggleClass ( "selected" ) ;
293
- $ ( this ) . find ( "polygon" ) . toggleClass ( "selected" ) ;
298
+ thisPolygon . toggleClass ( "selected" ) ;
294
299
} ,
295
300
mouseenter : function ( ) {
296
301
getTableRow ( this ) . addClass ( "hover" ) ;
0 commit comments