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

Version Path
arcabouco-0.2.16 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.15 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.14 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.13 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.12 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.11 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.10 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.9 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.8 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.7 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.6 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.5 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.4 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.3 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.2 lib/assets/js/core/helpers.js.coffee
arcabouco-0.2.1 lib/assets/js/core/helpers.js.coffee