imagemap-resizer
v0.0.2
Published
Allows dynamic resizing of imagemaps
Downloads
61
Readme
imagemap-resizer
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
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