spatial-navigator

1.1.3 • Public • Published

spatial-navigator Build Status

npm version

spatial-navigator is a javascript spatial navigation library

Use it this way

1 Download and Install spatial-navigator

2 Initialize the plugin by referencing the necessary files

<script src="./../../src/spatial-navigator.js"></script>

3 Examples

nav.reset();

nav.move.left();

nav.move.up();

nav.move.right();

nav.move.down();

<div class="btn focusable" data-focus-action-link="https://www.subidote.com">OK</div>
<div class="btn focusable" data-focus-action-function="console.log('LOL')">OK</div>

nav.action();

nav.focusById(1574711748163);

nav.groupBy('pop');
undefined
nav.curretGroup;
"pop"
nav.ungroup();
undefined

nav.map.draw();

nav.map.clear();

nav.focusArea('zone-1', 'bottom', 'right');

nav.focusArea('zone-1'); // top left

4 License

spatial-navigator is MIT licensed

Package Sidebar

Install

npm i spatial-navigator

Weekly Downloads

5

Version

1.1.3

License

MIT

Unpacked Size

34.1 kB

Total Files

4

Last publish

Collaborators

  • ajsoriar