D
D
Denis Savitsky2011-11-03 10:16:01
JavaScript
Denis Savitsky, 2011-11-03 10:16:01

Implementation of the selection of the photo area and commenting?

Please tell me the implementation of highlighting the photo area and commenting on Rails and jquery.
There is a picture, you need to select a rectangular area (or several) and leave comments.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
max_rip, 2011-11-03
@qweewq

Here is a plugin for highlighting an area, but then I think everything is clear.

L
lesha_penguin, 2011-11-03
@lesha_penguin

Option 1) Newfangled Canvas. You can do anything, any whistles and embellishments are limited only by a flight of wild imagination, you can at least stir up a mini-graphic editor. But a significant disadvantage: it will only work in very new browsers.
Option 2) Good old rectangular Div positioned above the image. The implementation is cheap and cheerful: mousedown over the picture - remember the mouse x1,y1, and when mouseup occurs - we take the mouse x2,y2 and stretch the div at position x1,y1 with a width of x2-x1 and a height of y2-y1. It will probably look condo, but after dancing for a few minutes with a tambourine, you can make it work even in prehistoric browsers.

P
perl_demon, 2011-11-03
@perl_demon

I think it should happen on the client. Drip towards HTML.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question