imagemap-resizer

0.0.2 • Public • Published

imagemap-resizer

browser support

Problem: You've got all these imagemaps, but if you resize their respective images, they break! So here's a handy Node module to resize those imagemaps for ya

View example

To run the example do a npm install && make example

Example usage

Note imagemap-resizer only supports images which are already loaded. If you call it on an unloaded image, it'll likely break

var createResizer = require('imagemap-resizer')
var img = document.querySelector('img.cool-image')
var resizer = createResizer(img)
 
window.addEventListener('resize', function(e) {
  resizer.resize()
})
 
/**
 * This will update all the coord attributes of the area
 * tags for the given image's corresponding imagemap :/
 */

License

ISC

Credits

Bell sound

Ocean sound

Dhammapada image

Readme

Keywords

Package Sidebar

Install

npm i imagemap-resizer

Weekly Downloads

10

Version

0.0.2

License

ISC

Last publish

Collaborators

  • sfrdmn