autoroute.js
Advanced tools
Comparing version 1.0.24 to 1.0.25
@@ -66,7 +66,15 @@ import Touch from 'hammerjs' | ||
el('[link]', (el, i) => { | ||
route.t.link[i] = new Touch.Manager(el) | ||
route.t.link[i] = new Touch.Manager(el, {domEvents: true}) | ||
route.t.link[i].add(new Touch.Tap()) | ||
route.t.link[i].on('tap', ev => { | ||
window.location.hash = '/' + ev.target.getAttribute('link') | ||
if (!ev.target.hasAttribute('link')) { | ||
while (!ev.target.hasAttribute('link')) { | ||
ev.target = ev.target.parentElement | ||
} | ||
window.location.hash = '/' + ev.target.getAttribute('link') | ||
} else { | ||
window.location.hash = '/' + ev.target.getAttribute('link') | ||
} | ||
@@ -73,0 +81,0 @@ if (ev.target.offsetParent.tagName == 'FOOTER') { |
{ | ||
"name": "autoroute.js", | ||
"version": "1.0.24", | ||
"version": "1.0.25", | ||
"description": "Another lightweight javascript routing framework ", | ||
@@ -5,0 +5,0 @@ "main": "autoroute.js", |
# autoroute.js | ||
## Guide | ||
https://autoroutejs.readme.io/ | ||
@@ -9,2 +9,10 @@ | ||
**1.0.25** | ||
- Improvements for link attributes | ||
**1.0.19-1.0.23** | ||
- Some improvements | ||
**1.0.18** | ||
@@ -11,0 +19,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7306
221
34