File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*! gridster.js - v0.1.0 - 2013-06-14
2
2
* http://gridster.net/
3
- * Copyright (c) 2013 ducksboard; Licensed MIT */
3
+ * Copyright (c) 2013 ducksboard; Licensed MIT
4
+ * 2015-08-12: merged https://github.com/ducksboard/gridster.js/commit/021a6c23e851210c1b817bd353a1e5e19ce10b90 to fix dragging issue in Chrome */
4
5
5
6
;
6
7
( function ( $ , window , document , undefined )
444
445
var $window = $ ( window ) ;
445
446
var isTouch = ! ! ( 'ontouchstart' in window ) ;
446
447
var pointer_events = {
447
- start : isTouch ? 'touchstart.gridster-draggable' : ' mousedown.gridster-draggable',
448
- move : isTouch ? 'touchmove.gridster-draggable' : ' mousemove.gridster-draggable',
449
- end : isTouch ? 'touchend.gridster-draggable' : ' mouseup.gridster-draggable'
448
+ start : 'touchstart.gridster-draggable mousedown.gridster-draggable' ,
449
+ move : 'touchmove.gridster-draggable mousemove.gridster-draggable' ,
450
+ end : 'touchend.gridster-draggable mouseup.gridster-draggable'
450
451
} ;
451
452
452
453
/**
533
534
534
535
fn . get_mouse_pos = function ( e )
535
536
{
536
- if ( isTouch )
537
+ if ( e . originalEvent && e . originalEvent . touches )
537
538
{
538
539
var oe = e . originalEvent ;
539
540
e = oe . touches . length ? oe . touches [ 0 ] : oe . changedTouches [ 0 ] ;
You can’t perform that action at this time.
0 commit comments