touchclick update
This commit is contained in:
parent
99301a0576
commit
4bc43645e0
1 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
###!
|
###!
|
||||||
Copyright (c) 2013 Derek Petersen https://github.com/tuxracer/touchclick MIT License
|
Copyright (c) 2013 Derek Petersen https://github.com/tuxracer/touchclick MIT License
|
||||||
https://raw2.github.com/tuxracer/touchclick/3.0.1/src/touchclick.coffee
|
https://github.com/tuxracer/touchclick/raw/3.1.0/src/touchclick.coffee
|
||||||
###
|
###
|
||||||
|
|
||||||
$ = if typeof jQuery is 'function' then jQuery else require 'jquery'
|
$ = if typeof jQuery is 'function' then jQuery else require 'jquery'
|
||||||
|
@ -56,9 +56,9 @@ events = (type) ->
|
||||||
$el[type] 'click', (e) ->
|
$el[type] 'click', (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
if window.navigator.msPointerEnabled
|
if window.navigator.pointerEnabled
|
||||||
$el[type] 'MSPointerDown', touchstart
|
$el[type] 'pointerdown', touchstart
|
||||||
$el[type] 'MSPointerUp', touchend
|
$el[type] 'pointerup', touchend
|
||||||
else
|
else
|
||||||
$el[type] 'touchstart mousedown', touchstart
|
$el[type] 'touchstart mousedown', touchstart
|
||||||
$el[type] 'touchmove mouseout', touchmove
|
$el[type] 'touchmove mouseout', touchmove
|
||||||
|
|
Loading…
Reference in a new issue