makeup-navigation-emitter
Advanced tools
Comparing version 0.0.6 to 0.1.0
12
index.js
@@ -50,6 +50,12 @@ 'use strict'; | ||
function onClick(e) { | ||
var indexData = e.target.dataset.makeupIndex; | ||
if (indexData !== undefined) { | ||
this.index = indexData; | ||
var element = e.target; | ||
var indexData = element.dataset.makeupIndex; | ||
// traverse ancestors until interactive element is found | ||
while (!indexData) { | ||
element = element.parentNode; | ||
indexData = element.dataset.makeupIndex; | ||
} | ||
this.index = indexData; | ||
} | ||
@@ -56,0 +62,0 @@ |
{ | ||
"name": "makeup-navigation-emitter", | ||
"description": "Emits custom events based on keyboard navigation of one or two dimensional model", | ||
"version": "0.0.6", | ||
"version": "0.1.0", | ||
"main": "index.js", | ||
@@ -22,7 +22,5 @@ "repository": "https://github.com/makeup-js/makeup-navigation-emitter.git", | ||
"watch": "onchange src/*.js docs/index.js -- npm run build", | ||
"transpile": "babel src/index.js --out-file index.js && babel src/util.js --out-file util.js" | ||
"transpile": "babel src/index.js --out-file index.js && babel src/util.js --out-file util.js", | ||
"version": "npm run prepublishOnly && git add -A docs/static test/static" | ||
}, | ||
"pre-commit": [ | ||
"prepublishOnly" | ||
], | ||
"keywords": [ | ||
@@ -51,3 +49,2 @@ "makeup", | ||
"parallelshell": "^3", | ||
"pre-commit": "^1", | ||
"rimraf": "^2" | ||
@@ -57,4 +54,4 @@ }, | ||
"custom-event-polyfill": "^0.3.0", | ||
"makeup-exit-emitter": "~0.0", | ||
"makeup-key-emitter": "~0.0" | ||
"makeup-exit-emitter": "~0.0.4", | ||
"makeup-key-emitter": "~0.0.3" | ||
}, | ||
@@ -61,0 +58,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
17
184
174978
Updatedmakeup-exit-emitter@~0.0.4
Updatedmakeup-key-emitter@~0.0.3