Answer the question
In order to leave comments, you need to log in
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
Here is a plugin for highlighting an area, but then I think everything is clear.
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question