Skip to content

mnoskov/accent-canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Interactive image areas in canvas

let accent = new Accent('.container', {
    image: '/images/map.jpg',
    areas: [{
        coords: [100,100, 100,200, 200,200, 200,100]
    }, {
        coords: [300,100, 300,200, 400,200, 400,100]
    }],
    startZoom: 'cover',
    style: {
        fill: 'none',
        fillOpacity: 0,
        stroke: 'none',
        strokeWidth: 0
    },
    hoverStyle: {
        fill: '#1CBB9D',
        fillOpacity: 0.4,
        stroke: '#1CBB9D',
        strokeWidth: 3,
        strokeOpacity: 1
    },
    hoverSpeed: 100
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published