Since the publication of the first version of Img Notes jquery plugin there was very little that needed to be done and the plugin itself has had more than 10,000 downloads, however there was one bug which I never got around to fixing and that was properly repositioning the notes on the image if the window was re-sized, that is till a couple of days ago when I needed to do exactly that – your bad code always catches up with you!!
Without much ado the new version has precisely 2 bug fixes
- Re-positioning of notes when the window is resized
- An issue with the z-index of the notes which led to some over-lapping
- The page has a form with appropriate fields which is hidden by default
- The window.load() apart from initializing the Img Notes binds 2 more events, the first with click on Add a note line to show the ImgAreaSelect and second to hide ImgAreaSelect when cancel is clicked
- The call to show ImgAreaSelect can take a callback function for onSelectChange, here the function showaddnote is specified with some sensible defaults, you can read the excellent documentation on the ImgAreaSelect web page to know more about it
- Well that is more or less *it* the form submission in my case is handled as a regular post to a CakePHP controller, you can try some more funky stuff like using AJAX for submission – let me know if you do
As the current implementation stands I see it as feature complete for my needs but suggestions for improvements, bug reports and patches most are most welcome.