Skip to content

diy/skill-hex-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diy-skill-hex-grid

Layout a grid of skill patches.

Example

Installation

npm install diy/skill-hex-grid

Usage

var g = grid(document.querySelector('.grid-wrapper'), { skills: skills.map(function (s) {
    return {
        img: {
            src: s.images.large,
            alt: s.title + ' Badge'
        },

        href: '/skills/' + s.url
    };
}) });

g.enable();

var g = grid($el, options);

Returns an instance of SkillHexGrid which is a wrapper for hex-grid.

var options = {
    skills: [],
    offset: {
        x: 0,
        y: 0
    }
}

g.disable()

Disables mouseenter and mouseleave interactions.

g.enable()

Enables mouseenter and mouseleave interactions.

About

Layout a grid of skill patches.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published