leather 0.2.26 → 0.2.27

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: 43eabab4009a76849f175719778c30c2c5a3bc94
4
- data.tar.gz: 22023eff4f4cccd72ad27f775589f35d8f1102f7
3
+ metadata.gz: d52c34a7d5d6e89e4f047f89ae3115443707447c
4
+ data.tar.gz: 66811bb812b8e86356a2432fed22044d955f0644
5
5
  SHA512:
6
- metadata.gz: a5d0b74bb6e1553ae57fdeb375aa433d2388748f594eaeffbdb57eb439d7ac01a7abc3969de5e0e77efb2b74a37a4710fa7f5fbf9dd6505aa4c3e1f76d6c4cc2
7
- data.tar.gz: 1811276929d7855dc5c0a620b577ef06b31dcea19facb5a8c79ac479007b61c400bd6121226f8c9f957c8312e73dd0efea132cf3a2f8c03a6c8b14c053440c73
6
+ metadata.gz: e26d8f086cc956d26a6743f94f6bf306a94a95d9754f326451071b7a01e2890bfe991b9cdf27c3c62ff357dcf70abee64e64940c40c4440f39c77b93e49de119
7
+ data.tar.gz: 7906d742761aec5029111fd69522f29aea24181b217f6ab6acb80f8b8bb576f2bc975fe59ec4da926abb2baf58163f52f729ee3e420a4b64555e273449951579
@@ -14,16 +14,19 @@ offCanvas =
14
14
 
15
15
  bindEvents: ->
16
16
  $(document).on 'click', '[data-toggle="off-canvas"]', (e) ->
17
- if e.handled != true
17
+ if !e.handled
18
18
  e.handled = offCanvas.toggle($(this), e)
19
19
 
20
20
  $(document).on 'click touchstart', '.off-canvas-show-left, .off-canvas-show-right', (e) ->
21
21
  clicked = $(e.target)
22
- if e.handled != true
23
- if (!clicked.hasClass("off-canvas") && clicked.parents(".off-canvas").length == 0 && clicked.data('toggle') != "off-canvas")
24
- e.preventDefault()
25
- else if (clicked.data('toggle') == "off-canvas" || (clicked.parents(".off-canvas").length && clicked.hasClass("close")))
26
- e.handled = offCanvas.close(e)
22
+ if !e.handled && (offCanvas.isBody(clicked)|| offCanvas.isClose(clicked))
23
+ e.handled = offCanvas.close(e)
24
+
25
+ isBody: (clicked) ->
26
+ (!clicked.hasClass("off-canvas") && clicked.parents(".off-canvas").length == 0)
27
+
28
+ isClose: (clicked) ->
29
+ (clicked.parents(".off-canvas").length && clicked.hasClass("close"))
27
30
 
28
31
  toggle: (target, e) ->
29
32
  e.stopPropagation()
@@ -1,3 +1,3 @@
1
1
  module Leather
2
- VERSION = "0.2.26"
2
+ VERSION = "0.2.27"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leather
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.26
4
+ version: 0.2.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Van Der Beek