spatial-virtual-dom
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -5,6 +5,7 @@ /* | ||
var SpatialNavigator = require('./spatial'); | ||
var sNavigator; | ||
var spatial = function (config) { | ||
var SpatialNavigator = require('./spatial'); | ||
config = config || {}; | ||
@@ -134,3 +135,3 @@ | ||
} | ||
} else if (name === 'focusable') { | ||
} else if (sNavigator && name === 'focusable') { | ||
if (value === true) { | ||
@@ -172,3 +173,3 @@ sNavigator.add(this.el); | ||
/* Nothing to do */ | ||
} else if (name === 'focusable') { | ||
} else if (sNavigator && name === 'focusable') { | ||
sNavigator.remove(this.el); | ||
@@ -175,0 +176,0 @@ this.rmProp('tabindex'); |
{ | ||
"name": "spatial-virtual-dom", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Virtual DOM with spatial navigation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
### SpatialNavigation Virtual DOM | ||
[](https://travis-ci.org/linuxenko/spatial-virtual-dom) [](https://coveralls.io/github/linuxenko/spatial-virtual-dom) [](https://www.npmjs.com/package/spatial-virtual-dom) []() [](https://github.com/linuxenko/spatial-virtual-dom) [](http://standardjs.com/) | ||
[](https://travis-ci.org/linuxenko/spatial-virtual-dom) [](https://coveralls.io/github/linuxenko/spatial-virtual-dom) [](https://www.npmjs.com/package/spatial-virtual-dom) []() [](https://github.com/linuxenko/spatial-virtual-dom) [](http://standardjs.com/) [](https://github.com/linuxenko/spatial-virtual-dom) | ||
@@ -9,3 +9,3 @@ Spatial navigation ([MDN](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS_for_TV/TV_remote_control_navigation)) integration with [virtual dom](https://github.com/linuxenko/basic-virtual-dom). | ||
Virtual DOM initiazliation with configurabe `spatial` function. | ||
Virtual DOM initiazliation with configurable `spatial` function. | ||
@@ -16,7 +16,6 @@ **`spatial(options)`** | ||
* `autofocus` automatically focus when window loose its focus. | ||
* `keys` setup of preconfigured key codes. | ||
* `keys` preconfigured key codes. | ||
### License | ||
MIT (c) 2017 Svetlana Linuxenko |
85033
20