All posts in Code

Something I’ve been meaning to do for a long time now is to create a couple of back end implementations for my JavaScript Image Cropper UI (I really need to come up with a snazzy name for that) – obviously that hasn’t happened.

I have noticed a couple of implementations appear in the comments, we are now using it at work and I have been emailed about at least one more, but I would like to formalise this a little bit to share these implementations with other users; hence my solicitation.
Continue reading this entry »

Tip Jar
A very, very generous donation I received yesterday for my JavaScript Image Cropper UI reminded me of a conversation I had with my friend Martin Laine quite a while ago during an instant messenger conversation when we both happened to get donations for our separate coding projects (him for his fantastic Audio Player WordPress plugin and me for my JavaScript Image Cropper UI – again) at the same time.

That conversation, I feel, gives quite a concise view of what donations mean to people like me and Martin (and possibly everyone else who asks for donations to support their free projects) so I thought I would share it here to give you the view from the other side of the PayPal account.
Continue reading this entry »

I’m currently in the middle of writing a reusable little JavaScript utility, which I’ll probably release when it’s finished, for one of my many projects and I wanted to employ unit testing as part of the development process, as I believe in the benefits of it quite strongly.

However my previous experience with unit testing JavaScript haven’t been the most pleasent, I have tried the most common nUnit variations for JS, the best of which was JSUnit. But I always found this a little cumbersome and difficult to use, however I had recently read about the unit testing available with script.aculo.us and although the only documentation I could find was the PDF available at mir.aculo.us I thought I’d give it a go.
Continue reading this entry »

I’ve finally released the latest version of the JavaScript Image Cropper UI which has been updated to version 1.2.0.

This adds quite a few bugs fixes, feature additions (the much requested ability to set maximum dimensions) and speed improvements and general streamlining.

NOTE: One really important change to note is that the cropper no longer has the default behaviour of automatically setting a ratio when both min width & height passed, the ratioDimensions must be now passed when this functionality is required.
Continue reading this entry »

For those of you who have had the pleasure of dealing with browser testing slightly complex CSS the title explains it all.

For those of you who haven’t, all I have to say is this: you lucky bastards.

Just a quick note to say that the JavaScript Image Cropper UI has been updated to version 1.1.3.

This adds the requested feature to allow you to set dimensions & position for the cropper on load, for example if you want to start the cropper with a previously selected area for a given image, say when the rest of a form this is part of doesn’t validate, this will allow you to do that.

As well as fixing a tiny bug in the CSS I’ve fixed a slightly larger one where pressing ‘remove cropper’ twice in IE removed the image from the source altogether.

I was hoping to get more things from the bug/feature request list into this release, but unfortunately I haven’t had time. As usual, please us the JavaScript Image Cropper UI code page to leave comments & bug reports etc. on the cropper UI.

I can’t believe how much attention and traffic I’ve been getting since I launched my JavaScript Image Cropper UI, the response has been amazing. The traffic is huge compared to what I was getting, and a lot more than I was expecting to get when I launched the site little over 8 months ago.

It has already had over 650 downloads with over 450 being of the latest version. I’m excited about the comments I’ve been getting on the cropper and I’ve been fascinated when following all the incoming links to the cropper to see where people are coming from and what people are saying about it.
Continue reading this entry »

Just another quick update to the JavaScript Image Cropper UI to bring it to version 1.1.2, this update includes a single fix to ratios. I had noticed when I put together the demo page and added the widescreen (16:9) ratio demo that there was something a little off in my ratio calculations.

This was brought to my attention again in a couple of comments by Andy Skelton, who also supplied a patch to the issue.

See the 16:9 ratio demo to see the patch in action or head over to the code page for the downloads.

Thanks again to Andy for submitting this patch so quickly.

Just another quick update to the JavaScript Image Cropper UI to bring it to version 1.1.1, this update includes the following:

See the demo page to test the new fixes or head over to the code page for the downloads.

I’ve just updated the JavaScript Image Cropper UI to version 1.1.0, this update includes the following:

  • Added method to reset parameters – useful for when dynamically changing img the cropper is attached to.
  • Added method to remove cropper from image.
  • Fixed bug with IE constantly trying to reload select area background image.
  • Applied a more robust fix to Safari & IE rendering issues.

I have also updated the demo page to include a new demo that uses the new ability to dynamically change the image or remove the cropper, this is also included as one of the tests within the downloads.