YavorIvanov
YavorIvanov

Reputation: 145

jQuery and Rails image tagging / rectangle selection

I have a simple problem in my mind but can't figure out where to start and JS isn't my strongest front. The JavaScript part is what gives me troubles.

I have an uploaded image which I want to drag my mouse upon to make a rectangle and get the rectangle coordinates. Those coordinates should go into my Rails app db so that this rectangle is latter displayed to the user and the image part that is selected will be zoomed to the user.

I've gone through several jQuery plugins that do tagging on images but first of all they are too complex for my needs and can't be customizable to this specific need of mine.

In order to get a real live example please see this http://www.stylebistro.com/lookbook/Tops/PJfJzgo2fN9

It is essentially what I want to achieve but the administration part is giving me troubles.

Regards, Yavor

Upvotes: 3

Views: 1036

Answers (1)

Paul Sweatte
Paul Sweatte

Reputation: 24617

jCrop has an API that returns image coordinates. It can zoom the image as well, so it should be a good fit.

Upvotes: 1

Related Questions