Sha256: 1b0a3fe343cc60f41c029777d4635aa85522e4b4b4b7b2dd844b50a2d31566e7
Contents?: true
Size: 512 Bytes
Versions: 16
Compression:
Stored size: 512 Bytes
Contents
@getMousePos = ( event ) -> if TOUCH_SUPPORT touch = event.originalEvent.touches[0] || event.originalEvent.changedTouches[0] cur_x = touch.pageX cur_y = touch.pageY else cur_x = event.clientX cur_y = event.clientY return { x: cur_x, y: cur_y } @distanceFrom = ( x, y, x0, y0 ) -> Math.sqrt((x -= x0) * x + (y -= y0) * y) @detectLanguage = -> language = window.navigator.userLanguage || window.navigator.language language = language.toLowerCase().replace('-','').replace('_','')
Version data entries
16 entries across 16 versions & 1 rubygems