0.0.2 • Published 10 years ago

imagemap-resizer v0.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
10 years ago

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