@@ -85,8 +85,8 @@ export default class Bar {
85
85
this . compute_expected_progress ( ) ;
86
86
this . expected_progress_width =
87
87
this . gantt . options . column_width *
88
- this . duration *
89
- ( this . expected_progress / 100 ) || 0 ;
88
+ this . duration *
89
+ ( this . expected_progress / 100 ) || 0 ;
90
90
}
91
91
92
92
draw ( ) {
@@ -385,6 +385,27 @@ export default class Bar {
385
385
} ) ;
386
386
387
387
$ . on ( this . group , 'dblclick' , ( e ) => {
388
+ if ( this . action_completed ) {
389
+ // just finished a move action, wait for a few seconds
390
+ return ;
391
+ }
392
+ this . group . classList . remove ( 'active' ) ;
393
+ if ( this . gantt . popup )
394
+ this . gantt . popup . parent . classList . remove ( 'hide' ) ;
395
+
396
+ this . gantt . trigger_event ( 'double_click' , [ this . task ] ) ;
397
+ } ) ;
398
+ let tapedTwice = false ;
399
+ $ . on ( this . group , 'touchstart' , ( e ) => {
400
+ if ( ! tapedTwice ) {
401
+ tapedTwice = true ;
402
+ setTimeout ( function ( ) { tapedTwice = false ; } , 300 ) ;
403
+ return false ;
404
+ }
405
+ e . preventDefault ( ) ;
406
+ //action on double tap goes below
407
+
408
+
388
409
if ( this . action_completed ) {
389
410
// just finished a move action, wait for a few seconds
390
411
return ;
@@ -528,7 +549,7 @@ export default class Bar {
528
549
this . gantt . config . ignored_positions . reduce ( ( acc , val ) => {
529
550
return acc + ( val >= this . x && val <= progress_area ) ;
530
551
} , 0 ) *
531
- this . gantt . config . column_width ;
552
+ this . gantt . config . column_width ;
532
553
if ( progress < 0 ) return 0 ;
533
554
const total =
534
555
this . $bar . getWidth ( ) -
@@ -642,8 +663,8 @@ export default class Bar {
642
663
this . $expected_bar_progress . setAttribute (
643
664
'width' ,
644
665
this . gantt . config . column_width *
645
- this . actual_duration_raw *
646
- ( this . expected_progress / 100 ) || 0 ,
666
+ this . actual_duration_raw *
667
+ ( this . expected_progress / 100 ) || 0 ,
647
668
) ;
648
669
}
649
670
0 commit comments