Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

grid_D-Pad

Use keyboard D-pad control grid layout

Usage

new a gridDPad object

var gridDPad = new gridDPad();

parameter

  • gridW[Number] - require

    • grid width
  • gridH[Number] - require

    • grid height
  • domList[Array] - require

    • grid DOM object
  • transitionDom[object]

    • move scroll transition
var gridW = 320,
    gridH = 180;

var gridDPad = new gridDPad({
    gridW: gridW,
    gridH: gridH,
    domList: document.querySelectorAll('li'),
    transitionDom: document.querySelector('.transition')
});

Method

  • move(type)

    • grid move arrow
    • type = 'left' or 'up' or 'right' or 'down'
gridDPad.move('left');

gridDPad.move('up');

gridDPad.move('right');

gridDPad.move('down');

About

Use keyboard D-pad control grid layout

Resources

License

Releases

No releases published

Packages

No packages published