material_raingular 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdbe7c15b8aad30f7cca54010efa273087fcc7f3
4
- data.tar.gz: a08eb4471c0232321aeff231732845d8dd8df633
3
+ metadata.gz: 95ebd538a091e42682e232d4c7f484b066f64e5f
4
+ data.tar.gz: ac898c80b273df942dea0b41182934b7abc65832
5
5
  SHA512:
6
- metadata.gz: fb50f5968c5eda7feaf8d28b7a434da0ca28a2753a5c3947267387149ff96e48d8e682671a87ada93bfdab87860ae952cd1f1fdd5c4f89b15cdff7b50b39d1b5
7
- data.tar.gz: fab4c9d861c51d34ded5840b6fe42c0216633c4649c74bb7c06859e5993906a72c5675194dc9999c1a0d0d19a1c2f5f9f4be2411e7d2656009991bbe7b6a254b
6
+ metadata.gz: e8ee57135b16f5ce7b1f28cc9bc9061f203e13a67affdb6373249320834354664563f38f642779c26cb4577043ed894cf9259321fc3043145a05ac85cbd0b7d7
7
+ data.tar.gz: dfecb25ac53b1c3e01092b158dfa2e08297dcdf0ccd420f0e756c56ffc908c8c20e189353926858cb15d7596db557f9d00d40f1d0f2a529f4a192b01cd658396
@@ -268,16 +268,30 @@ angular.module('FilteredSelect', [])
268
268
  for item in filteredList()
269
269
  if isMobile
270
270
  li = angular.element '<li>' + functions.viewValueFn(item) + '</li>'
271
+ touchDetails = {}
272
+ li.bind 'touchstart', (event) =>
273
+ touch = event.touches[event.touches.length - 1]
274
+ touchDetails = {
275
+ startX: touch.screenX
276
+ startY: touch.screenY
277
+ }
278
+ li.bind 'touchend', (event) =>
279
+ touch = event.changedTouches[event.changedTouches.length - 1]
280
+ if Math.abs(touchDetails.startX - touch.screenX) < 20 && Math.abs(touchDetails.startY - touch.screenY) < 20
281
+ val = (event.target.children[0].value)["to_" + event.target.children[0].getAttribute('ng-data-type')]()
282
+ @clickedVal = val
283
+ updateValue(val)
271
284
  else
272
285
  li = angular.element '<a class="item">' + functions.viewValueFn(item) + '</a>'
286
+ li.bind 'mousedown', ($event)=>
287
+ val = ($event.target.children[0].value)["to_" + $event.target.children[0].getAttribute('ng-data-type')]()
288
+ @clickedVal = val
289
+ updateValue(val)
290
+
273
291
  ip = angular.element '<input type="hidden">'
274
292
  ip.val(functions.modelValueFn(item))
275
293
  ip[0].setAttribute('ng-data-type',typeof functions.modelValueFn(item))
276
294
  li.append(ip)
277
- li.bind 'mousedown', ($event)=>
278
- val = ($event.target.children[0].value)["to_" + $event.target.children[0].getAttribute('ng-data-type')]()
279
- @clickedVal = val
280
- updateValue(val)
281
295
  elements.template.append(li)
282
296
  setInitialValue = ->
283
297
  unless isMobile
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material_raingular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-26 00:00:00.000000000 Z
11
+ date: 2017-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler